home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / inet / ien / ien-182 < prev    next >
Text File  |  1988-12-01  |  87KB  |  3,133 lines

  1. IEN-182
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.                    Issues in Buffer Management
  25.  
  26.                   Bolt Beranek and Newman Inc.
  27.  
  28.                           Eric C. Rosen
  29.  
  30.                             May 1980
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59. IEN-182                              Bolt Beranek and Newman Inc.
  60.                                                     Eric C. Rosen
  61.  
  62.  
  63.  
  64.                         Table of Contents
  65.  
  66.  
  67.  
  68.  
  69. 1   Introduction.......................................... 1
  70. 2   Overview.............................................. 2
  71. 3   General Considerations of Buffer Management........... 3
  72. 4   Buffer Management  with  an  Ample  Supply  of
  73.     Buffers............................................... 9
  74. 4.1   Buffering for Output............................... 16
  75. 4.2   Buffering for Input................................ 18
  76. 4.3   Buffering for Generating Control Messages.......... 28
  77. 4.4   Buffering Data at the Source Node.................. 29
  78. 5   Buffer Management with a Shortage  of  Buffers
  79.   (ARPANET).............................................. 32
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.                                -i-
  115.  
  116.  
  117. IEN-182                              Bolt Beranek and Newman Inc.
  118.                                                     Eric C. Rosen
  119.  
  120.  
  121.  
  122. 1  Introduction
  123.  
  124.  
  125.         This note is an abridged  extract  from  BBN  Report  No.
  126.  
  127. 4473,  "ARPANET  Routing  Algorithm  Improvements,  Volume 1", by
  128.  
  129. Rosen et al.  It discusses the issues of buffer management in the
  130.  
  131. switches  which  implement  a network and is based on experiences
  132.  
  133. gained during the evolution of the ARPANET.
  134.  
  135.  
  136.         Since the Internet is itself  a  network,  and  hosts  or
  137.  
  138. gateways  implementing  TCP, IP, and other protocols have similar
  139.  
  140. buffer management design  decisions,  this  IEN  is  intended  to
  141.  
  142. distill  some  of  the ARPANET issues and present them to a wider
  143.  
  144. audience currently grappling with some of the same problems.
  145.  
  146.  
  147.         The original report is quite large (500 pages).  This  is
  148.  
  149. the first of several such extracts we plan to produce to serve as
  150.  
  151. background for the internet project work.  The report  was  first
  152.  
  153. published in August 1980.
  154.  
  155.  
  156.         Some of the  terminology  used  may  cause  confusion  if
  157.  
  158. associated  with  internet  work, for example "reassembly".  This
  159.  
  160. note discusses mechanisms purely internal to the  ARPANET,  which
  161.  
  162. itself  has  many  similarities to internet and TCP mechanisms in
  163.  
  164. internet hosts.  The ARPANET IMPs use retransmission, ACKS,  flow
  165.  
  166. control/windowing,  fragmentation  and  reassembly,  out-of-order
  167.  
  168. sequencing, and other mechanisms  which  create  a  serial  byte-
  169.  
  170.  
  171.  
  172.                                -1-
  173.  
  174.  
  175. IEN-182                              Bolt Beranek and Newman Inc.
  176.                                                     Eric C. Rosen
  177.  
  178.  
  179.  
  180. stream service based on a datagram network, much as TCP does.
  181.  
  182.  
  183.         The issues to be discussed in these notes  are  at  least
  184.  
  185. partially applicable to the internet mechanisms, including TCP in
  186.  
  187. hosts, as well as IP in  gateways,  since  those  mechanisms  are
  188.  
  189. functionally  similar  in  the  services  they  are  intended  to
  190.  
  191. implement.   We  propose  no  solutions  here,  such  as   buffer
  192.  
  193. mechanisms  for TCP implementations, but rather intend to explore
  194.  
  195. the issues which motivated the IMP implementation in the ARPANET,
  196.  
  197. to  help  TCP and internet implementors in their similar tasks of
  198.  
  199. creating an Internet.
  200.  
  201.  
  202.         Anyone interested in seeing how the issues raised in this
  203.  
  204. discussion can be applied to the ARPANET will want to see Chapter
  205.  
  206. 7 of BBN Report No. 4088, as well as Chapter 1.5  of  BBN  Report
  207.  
  208. No.  4473,  which  are  not  included in this excerpt.  Copies of
  209.  
  210. those reports are available from the author.
  211.  
  212.  
  213.  
  214.  
  215. 2  Overview
  216.  
  217.  
  218.      We will begin by considering, in general, the function of  a
  219.  
  220. buffer  management scheme in a packet-switching network.  We will
  221.  
  222. discuss the way in which such a procedure might be designed in an
  223.  
  224. "ideal"  network,  where there is an ample supply of buffers.  We
  225.  
  226. will see that, no matter how  many  buffers  there  are,  careful
  227.  
  228.  
  229.  
  230.                                -2-
  231.  
  232.  
  233. IEN-182                              Bolt Beranek and Newman Inc.
  234.                                                     Eric C. Rosen
  235.  
  236.  
  237.  
  238. buffer management is essential to good performance.  We will then
  239.  
  240. discuss the way in which procedures designed for an ideal network
  241.  
  242. need  to  be  modified  for  a network (like the ARPANET and most
  243.  
  244. other networks) in which  buffer  space  is  a  scarce  resource.
  245.  
  246. Finally,  we  will  compare the current ARPANET buffer management
  247.  
  248. procedures to the  procedures  we  develop,  and  will  recommend
  249.  
  250. changes to the former.
  251.  
  252.  
  253.  
  254.  
  255. 3  General Considerations of Buffer Management
  256.  
  257.  
  258.         A network node must execute many different functions  for
  259.  
  260. which it requires buffers.  Among these functions are:
  261.  
  262.  
  263.      1)  Transmitting  packets  on  the  various  output  devices
  264.  
  265.          (inter-node  trunks or host access lines).  Packets must
  266.  
  267.          be buffered while queuing for these  devices,  while  in
  268.  
  269.          transmission  on  these  devices,  and (sometimes) while
  270.  
  271.          awaiting acknowledgment from the node  or  host  on  the
  272.  
  273.          other side of the device.
  274.  
  275.  
  276.      2)  Receiving packets from the various input devices.
  277.  
  278.  
  279.      3)  Reassembling messages so they can be transmitted to  the
  280.  
  281.          destination host.
  282.  
  283.  
  284.      4)  Processing packets.  Packets must be buffered while  the
  285.  
  286.  
  287.  
  288.                                -3-
  289.  
  290.  
  291. IEN-182                              Bolt Beranek and Newman Inc.
  292.                                                     Eric C. Rosen
  293.  
  294.  
  295.  
  296.          CPU  is  processing  them,  and  they may have to occupy
  297.  
  298.          buffers while queuing for a busy processor.
  299.  
  300.  
  301.      5)  Creating protocol or control messages.  The  IMPs  often
  302.  
  303.          need to create control messages in order to run the many
  304.  
  305.          protocols necessary for proper network operation.
  306.  
  307.  
  308. It should be clear that, no matter how many buffers  exist  in  a
  309.  
  310. node,  a  "laissez-faire"  approach  to  buffer management cannot
  311.  
  312. possibly succeed.   In  a  laissez-faire  approach,  buffers  are
  313.  
  314. allocated  to  the  various  processes that need them on a first-
  315.  
  316. come, first-serve basis.  Any process, at any  time,  can  obtain
  317.  
  318. any number of buffers that are available at that time.  No import
  319.  
  320. is given to considerations of  fairness  or  of  overall  network
  321.  
  322. performance.   Therefore, a laissez-faire scheme will be prone to
  323.  
  324. lock-up.  Suppose, for example, that the output processes in some
  325.  
  326. node have taken all the buffers.  Then no input can be done.  If,
  327.  
  328. as is often the case, the  output  processes  cannot  free  their
  329.  
  330. buffers until an acknowledgment is received from some other node,
  331.  
  332. and if acknowledgments cannot be received because no buffers  are
  333.  
  334. available  for  input,  then there is a deadlock, and the buffers
  335.  
  336. will never be freed.  It is important  to  understand  that  this
  337.  
  338. sort of deadlock is not caused by a SHORTAGE of buffer space.  No
  339.  
  340. matter how much buffer space is available, it is always possible,
  341.  
  342. for  example,  that  the  network will try to utilize some output
  343.  
  344.  
  345.  
  346.                                -4-
  347.  
  348.  
  349. IEN-182                              Bolt Beranek and Newman Inc.
  350.                                                     Eric C. Rosen
  351.  
  352.  
  353.  
  354. device at a higher capacity than it is capable of handling.  With
  355.  
  356. a  laissez-faire approach to buffer management, there is no bound
  357.  
  358. on the number of buffers which may end up holding packets for the
  359.  
  360. overloaded   device.   The  possibility  of  deadlock  cannot  be
  361.  
  362. eliminated by adding more buffers.
  363.  
  364.  
  365.         This particular sort of deadlock is just one example of a
  366.  
  367. more general situation.  For the network to perform well, all the
  368.  
  369. processes in the nodes must be able to run at an  adequate  rate.
  370.  
  371. This  cannot  be guaranteed unless each process is guaranteed the
  372.  
  373. resources that it  needs.   Unless  each  process  is  explicitly
  374.  
  375. prevented from "hogging" resources, other processes may be unable
  376.  
  377. to run, and the network will not, in general,  be  able  to  give
  378.  
  379. adequate performance.  It must be understood, of course, that the
  380.  
  381. buffer supply is not the only resource which must be  managed  in
  382.  
  383. order  to  prevent hogging.  Similar sorts of deadlocks can occur
  384.  
  385. if some processes are allowed unrestricted access to CPU  cycles,
  386.  
  387. thereby  preventing  others  from  ever running at all.  Although
  388.  
  389. this chapter is primarily concerned only with management  of  the
  390.  
  391. buffer  space resource, management of the CPU resource is equally
  392.  
  393. important.  Furthermore, it must not be imagined  that  deadlocks
  394.  
  395. are  the  only  sort  of  performance degradation against which a
  396.  
  397. buffer management scheme must protect.  Freedom from deadlocks is
  398.  
  399. only a necessary, not a sufficient, condition of adequate network
  400.  
  401.  
  402.  
  403.  
  404.                                -5-
  405.  
  406.  
  407. IEN-182                              Bolt Beranek and Newman Inc.
  408.                                                     Eric C. Rosen
  409.  
  410.  
  411.  
  412. performance.  A scheme  which  dedicates  some  small  number  of
  413.  
  414. buffers to each process, while taking a laissez-faire approach to
  415.  
  416. the large majority of the buffers, may prevent  deadlocks,  since
  417.  
  418. it  will  permit  each  process  to run at some slow but non-zero
  419.  
  420. rate.  However, such an approach may not allow all the  processes
  421.  
  422. to  run  at "adequate" speeds; if some processes are running "too
  423.  
  424. slowly," then ordinary users of the network may not  be  able  to
  425.  
  426. distinguish  that  situation  from the situation where there is a
  427.  
  428. deadlock.  The problem is the general  one  of  "fairness."   The
  429.  
  430. purpose  of  a  buffer  management  scheme  is  to ensure that no
  431.  
  432. process gets either more or less  than  its  fair  share  of  the
  433.  
  434. buffer  resource.   (It  is worth noting that simply specifying a
  435.  
  436. protocol in some formal language, i.e., in a  way  which  is  not
  437.  
  438. implementation-specific, and proving it to be deadlock-free, does
  439.  
  440. not guarantee that the protocol will perform fairly.  Such formal
  441.  
  442. specifications  almost  never  address  such  important issues as
  443.  
  444. buffer management or  fairness.   In  fact,  by  abstracting  the
  445.  
  446. protocol  specification  from implementation considerations, such
  447.  
  448. issues are only obscured and made easier to overlook.) Of course,
  449.  
  450. such  notions  as  "adequate  performance," "too slow," and "fair
  451.  
  452. share"  are  hopelessly  qualitative.   Implementing   a   buffer
  453.  
  454. management  scheme in an actual network would require giving some
  455.  
  456. quantitative interpretation to these notions.  The precise way in
  457.  
  458. which  these  notions  are  quantified would depend on the design
  459.  
  460.  
  461.  
  462.                                -6-
  463.  
  464.  
  465. IEN-182                              Bolt Beranek and Newman Inc.
  466.                                                     Eric C. Rosen
  467.  
  468.  
  469.  
  470. objectives of the particular network, as well as its  performance
  471.  
  472. characteristics,  and it would probably require a large degree of
  473.  
  474. arbitrariness.  This does not mean, though, that the  qualitative
  475.  
  476. considerations   cannot   guide   the  development  of  a  buffer
  477.  
  478. management procedure, but only that any such procedure should  be
  479.  
  480. sufficiently  parameterized  so  that it can be tuned to meet the
  481.  
  482. PARTICULAR requirements of a PARTICULAR network.
  483.  
  484.  
  485.         The considerations raised above do not  mean  that  there
  486.  
  487. should  be  no  sharing of buffers among processes, but only that
  488.  
  489. the sharing  should  be  controlled  so  that  considerations  of
  490.  
  491. fairness  and overall network performance can play a role.  There
  492.  
  493. is, of course,  a  disadvantage  to  restricting  the  amount  of
  494.  
  495. sharing of buffers among processes.  If a buffer is available for
  496.  
  497. process A, but not for process B, then there will  be  situations
  498.  
  499. in  which a buffer must lie idle, because process A does not need
  500.  
  501. it, even though process B really has a  use  for  it.   In  these
  502.  
  503. particular situations, the performance of process B (and possibly
  504.  
  505. of the whole  node)  may  be  degraded.   The  justification  for
  506.  
  507. keeping  the  buffer  idle  though  is  that  it is possible that
  508.  
  509. process A will have a need for the buffer before process B  would
  510.  
  511. finish  with  it,  and  that  if  such a situation were to arise,
  512.  
  513. overall performance would be improved by keeping the buffer  idle
  514.  
  515. until  needed  by  process  A.  The validity of the justification
  516.  
  517.  
  518.  
  519.  
  520.                                -7-
  521.  
  522.  
  523. IEN-182                              Bolt Beranek and Newman Inc.
  524.                                                     Eric C. Rosen
  525.  
  526.  
  527.  
  528. depends on the probability that process A really  will  need  the
  529.  
  530. buffer  before  process  B  would  finish  with it.  This sort of
  531.  
  532. probability is very difficult to evaluate A PRIORI.  Furthermore,
  533.  
  534. the  probability  may  change as network conditions change.  This
  535.  
  536. suggests that we  might  want  to  vary  the  number  of  buffers
  537.  
  538. reserved   for   particular   processes  as  a  function  of  the
  539.  
  540. utilization of resources by the various processes.  That is,  the
  541.  
  542. buffer  management  scheme  may need feedback from a more general
  543.  
  544. congestion control  scheme  which  can  measure  the  pattern  of
  545.  
  546. resource  utilization  and  determine whether it is satisfactory.
  547.  
  548. This is only natural.  The purpose of a congestion control scheme
  549.  
  550. is  to ensure that the demands placed on resources in the network
  551.  
  552. do not exceed  the  capacity  of  the  resources,  AND  that  the
  553.  
  554. resources  are  allocated  to  the demands in the way that yields
  555.  
  556. best overall network service.  In order to achieve  these  goals,
  557.  
  558. the  algorithm (or at least the parameters of the algorithm) used
  559.  
  560. to assign resources to demands may need to change as the  pattern
  561.  
  562. of  demands  changes.  A buffer management scheme is an algorithm
  563.  
  564. for assigning one particular kind of resource  (buffers)  to  the
  565.  
  566. demands  made  on  that  resource.   Hence it is just a part of a
  567.  
  568. congestion control scheme, and may  need  to  interact  with  the
  569.  
  570. other parts of the scheme for best overall performance.
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.                                -8-
  579.  
  580.  
  581. IEN-182                              Bolt Beranek and Newman Inc.
  582.                                                     Eric C. Rosen
  583.  
  584.  
  585.  
  586. 4  Buffer Management with an Ample Supply of Buffers
  587.  
  588.  
  589.         If we were designing a new network, with an ample  amount
  590.  
  591. of  buffer  space,  one of the important desiderata of the buffer
  592.  
  593. management scheme would be to enable all  output  devices  (i.e.,
  594.  
  595. hosts  and  inter-node  trunks)  to  run at their rated capacity.
  596.  
  597. Transmission  of  packets  over  an  output  device  is   usually
  598.  
  599. controlled  by  means  of a protocol which requires the packet to
  600.  
  601. remain buffered until a positive acknowledgment is received.  The
  602.  
  603. number of buffers needed to run such a device at full capacity is
  604.  
  605. a function both of the transmission speed of the  device  and  of
  606.  
  607. the time it takes (on the average) for acknowledgments to return,
  608.  
  609. which itself  is  a  function  of  the  physical  length  of  the
  610.  
  611. transmission  line  (speed-of-light  propagation  delay)  and the
  612.  
  613. processing latencies of the device which is receiving the output.
  614.  
  615. For  each  output  device  it  is  relatively  straightforward to
  616.  
  617. compute this number  of  buffers,  at  least  approximately.   To
  618.  
  619. ensure  that  each  output  device  can  always  run at its rated
  620.  
  621. capacity, the  buffer  management  scheme  must  "dedicate"  that
  622.  
  623. number of buffers to the particular output device in question.
  624.  
  625.  
  626.         It is important to  understand  just  what  it  means  to
  627.  
  628. "dedicate  N buffers" to a particular device or process.  It does
  629.  
  630. NOT means that certain physical buffers (i.e., physical areas  of
  631.  
  632. memory)  are  set  aside  for use only by that process.  It means
  633.  
  634.  
  635.  
  636.                                -9-
  637.  
  638.  
  639. IEN-182                              Bolt Beranek and Newman Inc.
  640.                                                     Eric C. Rosen
  641.  
  642.  
  643.  
  644. only that the process should always be able to obtain  N  buffers
  645.  
  646. whenever  it has a need for N buffers.  There is no reason at all
  647.  
  648. why the same N physical buffers should be used each time.  To see
  649.  
  650. exactly  what  this  means  in  practice,  we  must  consider the
  651.  
  652. mechanism whereby a buffer is (logically)  moved  from  a  source
  653.  
  654. process  to  a  destination process.  At any given time, a buffer
  655.  
  656. which is not free is considered to be under the control  of  some
  657.  
  658. process.   When  that process has completed its processing of the
  659.  
  660. buffer, it must somehow release control of  it.   In  some  cases
  661.  
  662. (e.g.,  a  packet has been transmitted on an inter-node trunk and
  663.  
  664. an acknowledgment for it received) the packet  which  is  in  the
  665.  
  666. buffer  is  no  longer needed at that node, and the buffer can be
  667.  
  668. freed.  In other cases, however, control of the  buffer  must  be
  669.  
  670. turned  over to some other process.  An example is a packet which
  671.  
  672. is under  control  of  the  forwarding  process  of  the  routing
  673.  
  674. algorithm.   Once  the routing algorithm decides where to forward
  675.  
  676. the packet, the buffer in which it resides must be turned over to
  677.  
  678. some  output  process which will ensure its transmission over the
  679.  
  680. appropriate output device.  Before turning the buffer over to the
  681.  
  682. next  process,  it  must  be  determined  whether  doing so would
  683.  
  684. prevent any other process from obtaining the  number  of  buffers
  685.  
  686. that  have  been  "dedicated" to it.  If so, the buffer cannot be
  687.  
  688. turned over to that destination process.  If the packet  residing
  689.  
  690. in  the  buffer  is  under  control  of  some  sort  of  reliable
  691.  
  692.  
  693.  
  694.                               -10-
  695.  
  696.  
  697. IEN-182                              Bolt Beranek and Newman Inc.
  698.                                                     Eric C. Rosen
  699.  
  700.  
  701.  
  702. transmission procedure (e.g., the  ARPANET's  IMP-IMP  protocol),
  703.  
  704. the  buffer can simply be freed.  This will not result in loss of
  705.  
  706. the packet, since the reliable transmission procedure will ensure
  707.  
  708. that  the  packet  is  seen again, and again, until it is finally
  709.  
  710. accepted.  This is usually the case in the ARPANET with a  packet
  711.  
  712. that has been received from a neighboring node.  If the receiving
  713.  
  714. node discards the packet without sending an acknowledgment to the
  715.  
  716. transmitting  node, the latter node can usually be relied upon to
  717.  
  718. send the packet again.  (Note that  this  implies  that,  in  the
  719.  
  720. ARPANET,   the   receiving   node   cannot   send  an  inter-node
  721.  
  722. acknowledgment for a packet until that  packet  has  been  turned
  723.  
  724. over  to  its  final  output  process.)   On the other hand, some
  725.  
  726. packets may not be under the control of a  reliable  transmission
  727.  
  728. procedure.   This  may  be the case with control packets that are
  729.  
  730. created in the node itself and which must be transmitted to  some
  731.  
  732. other  node  for  reasons  determined  by  some end-end protocol.
  733.  
  734. Freeing the buffer occupied by such a packet may result  in  loss
  735.  
  736. of  the  packet.  Since this is undesirable, if the buffer cannot
  737.  
  738. be given to its destination process, it must be returned  to  the
  739.  
  740. source process, where it must sit on some queue until some future
  741.  
  742. time when it can be accepted by the destination process.
  743.  
  744.  
  745.         In general, when making the determination as to whether a
  746.  
  747. buffer  can  be  turned  over  to a particular process, it is not
  748.  
  749.  
  750.  
  751.  
  752.                               -11-
  753.  
  754.  
  755. IEN-182                              Bolt Beranek and Newman Inc.
  756.                                                     Eric C. Rosen
  757.  
  758.  
  759.  
  760. sufficient merely to consider the number of  buffers  already  in
  761.  
  762. control  of  the  destination  process.   One must also take into
  763.  
  764. consideration the source process of the buffer. After all,  there
  765.  
  766. may  be  cases  in  which  the source process and the destination
  767.  
  768. process share a common pool of buffers.  In  such  cases,  buffer
  769.  
  770. management considerations can never cause the destination process
  771.  
  772. to refuse the buffer, no matter  how  many  buffers  are  already
  773.  
  774. under  its  control.   It follows that the correct decision as to
  775.  
  776. whether a buffer ought to  be  refused  cannot  be  made  without
  777.  
  778. knowledge  of  its source process.  Also, only by considering the
  779.  
  780. buffer's source process can it be determined whether or  not  the
  781.  
  782. buffer,  if  refused,  will be freed.  This is important to know,
  783.  
  784. since ONCE IT HAS BEEN DECIDED THAT A PARTICULAR PACKET CANNOT BE
  785.  
  786. DISCARDED  AT WILL, NO PROCESS SHOULD EVER REJECT THE PACKET AS A
  787.  
  788. RESULT OF BUFFER MANAGEMENT  CONSIDERATIONS.   Any  process  that
  789.  
  790. will  not  be able to obtain an adequate number of buffers if the
  791.  
  792. packet is accepted will also be  unable  to  obtain  an  adequate
  793.  
  794. number  of  buffers  if  the  packet  is  rejected.   After  all,
  795.  
  796. rejection of the packet will merely cause its buffer to  be  held
  797.  
  798. in  a  queue somewhere else in the node until it can be accepted.
  799.  
  800. Since the buffer cannot be freed, it will  not  become  available
  801.  
  802. for  use  by  any other process, so there is no point in refusing
  803.  
  804. it.  Rejecting the packet will serve only to increase its  delay,
  805.  
  806. without  any  countervailing  advantage.   This may mean that the
  807.  
  808.  
  809.  
  810.                               -12-
  811.  
  812.  
  813. IEN-182                              Bolt Beranek and Newman Inc.
  814.                                                     Eric C. Rosen
  815.  
  816.  
  817.  
  818. number of buffers under the control of a  given  process  exceeds
  819.  
  820. the  nominal  maximum  which  we  have  decided  to allow to that
  821.  
  822. process.  The point of the buffer management scheme, however,  is
  823.  
  824. not  so  much  to prevent a process from obtaining more than some
  825.  
  826. maximum number of buffers as to ensure that a process can  always
  827.  
  828. obtain  some  minimum  number  of buffers.  In the situation just
  829.  
  830. described, holding one process to a  certain  maximum  number  of
  831.  
  832. buffers  does  not  help any other process to obtain its minimum.
  833.  
  834. And while moving the  buffer  from  the  source  process  to  the
  835.  
  836. destination  process  in  this  situation  may  cause  the source
  837.  
  838. process to have less than  its  minimum  number  of  buffers,  it
  839.  
  840. cannot  hurt  the performance of the source process, which, after
  841.  
  842. all, has already finished with its use of the buffer.   There  is
  843.  
  844. certainly  no  point  in  forcing  a process to keep control of a
  845.  
  846. buffer with which it  is  finished;  that  could  serve  only  to
  847.  
  848. degrade overall performance.
  849.  
  850.  
  851.         To put the point another way, once the node has committed
  852.  
  853. itself   not   to  discard  the  packet,  all  buffer  management
  854.  
  855. considerations are otiose.  Of course, this is not to say that  a
  856.  
  857. packet  to  which the node is committed ought never to be refused
  858.  
  859. by any process in the  node,  but  only  that  considerations  of
  860.  
  861. buffer  management  can  play  no role in the refusal.  There are
  862.  
  863. many resources other than buffer space  which  may  be  in  short
  864.  
  865.  
  866.  
  867.  
  868.                               -13-
  869.  
  870.  
  871. IEN-182                              Bolt Beranek and Newman Inc.
  872.                                                     Eric C. Rosen
  873.  
  874.  
  875.  
  876. supply;  management  of  these  resources  may  well  dictate the
  877.  
  878. rejection of a packet to which the node is  committed.   However,
  879.  
  880. the same considerations apply.  A packet should never be rejected
  881.  
  882. due to resource management  considerations  unless  rejecting  it
  883.  
  884. will  free  resources  which  would  not  be free were the packet
  885.  
  886. accepted.
  887.  
  888.  
  889.         Of course, this  principle  may  have  unfortunate  side-
  890.  
  891. effects  that  must  be controlled.  If two packets are competing
  892.  
  893. for buffer space, and one of the packets is discardable while the
  894.  
  895. other  is not, the non-discardable packet has an advantage, since
  896.  
  897. it cannot be refused.  For example, in the ARPANET, packets which
  898.  
  899. an  IMP  receives  from  a neighboring IMP are discardable, since
  900.  
  901. they are controlled by a  reliable  transmission  procedure  (the
  902.  
  903. IMP-IMP  protocol) and will be retransmitted if dropped.  Packets
  904.  
  905. received from  a  host,  however,  are  controlled  by  the  1822
  906.  
  907. protocol,  which  does not provide for retransmissions, and which
  908.  
  909. in fact assumes that the IMP will not drop a packet once  it  has
  910.  
  911. fully  received  it.  This fact gives packets received from hosts
  912.  
  913. an unfair advantage over packets received from  neighboring  IMPs
  914.  
  915. in  the  competition  for  buffer  space.  This is a particularly
  916.  
  917. unhappy situation, since it can lead to the violation of  one  of
  918.  
  919. the  basic  principles of congestion control, namely that packets
  920.  
  921. already in the  network  should  be  favored  over  packets  just
  922.  
  923.  
  924.  
  925.  
  926.                               -14-
  927.  
  928.  
  929. IEN-182                              Bolt Beranek and Newman Inc.
  930.                                                     Eric C. Rosen
  931.  
  932.  
  933.  
  934. entering  the  network.  The correct solution to this problem, of
  935.  
  936. course, is to refrain from using protocols which force a node  to
  937.  
  938. treat a packet as non-discardable before all the resources needed
  939.  
  940. to process that packet have been obtained.   We  will  return  to
  941.  
  942. this  issue  when  we  discuss  the  particular  case  of  buffer
  943.  
  944. management in the ARPANET.
  945.  
  946.  
  947.         It should also be noted  that  moving  a  buffer  from  a
  948.  
  949. source  process  to  a destination process typically requires the
  950.  
  951. mediation of a third process which serves as the Dispatcher.   In
  952.  
  953. the  ARPANET,  this is the function of the TASK process.  While a
  954.  
  955. buffer is queued for or being processed by the Dispatcher, it  is
  956.  
  957. still  considered  to be under the control of the source process,
  958.  
  959. for purposes of buffer management.  The  reason,  of  course,  is
  960.  
  961. that  the decision as to whether a particular destination process
  962.  
  963. must refuse the buffer is independent of whether  the  buffer  is
  964.  
  965. being  passed to it directly by the source process, or whether it
  966.  
  967. is being passed to it by the Dispatcher.  Therefore, it makes  no
  968.  
  969. sense  to  treat  the  Dispatcher  itself  as  a  source process.
  970.  
  971. Similarly, since the Dispatcher itself can never refuse a buffer,
  972.  
  973. it  makes  no  sense to treat it as a destination process either.
  974.  
  975. The use of a dispatching process should  be  transparent  to  the
  976.  
  977. buffer management scheme.
  978.  
  979.  
  980.         Sometimes a buffer may need to be under the  simultaneous
  981.  
  982.  
  983.  
  984.                               -15-
  985.  
  986.  
  987. IEN-182                              Bolt Beranek and Newman Inc.
  988.                                                     Eric C. Rosen
  989.  
  990.  
  991.  
  992. control  of  two distinct processes in order for its packet to be
  993.  
  994. processed.  If this is  ever  the  case,  the  buffer  management
  995.  
  996. scheme  must  ensure  that whenever the buffer can be assigned to
  997.  
  998. one process, it can also be assigned to the other.  If the buffer
  999.  
  1000. cannot  be  processed unless controlled by both processes, then a
  1001.  
  1002. situation where it can be controlled by one process but  not  the
  1003.  
  1004. other  makes  no  sense  at  all.   Such a situation would simply
  1005.  
  1006. result in a waste of space, by allowing a buffer to  be  occupied
  1007.  
  1008. by  a  packet which cannot be processed.  This illustrates a most
  1009.  
  1010. important point in the design of a buffer management scheme.  The
  1011.  
  1012. purpose  of  buffer  management is to ensure good overall network
  1013.  
  1014. performance.  Therefore, ONE CANNOT DETERMINE  HOW  MANY  BUFFERS
  1015.  
  1016. NEED  TO BE DEDICATED TO A PROCESS BY CONSIDERING THAT PROCESS IN
  1017.  
  1018. ISOLATION.   RATHER,  ONE  MUST  CONSIDER  THE  ROLE  THAT   THAT
  1019.  
  1020. PARTICULAR   PROCESS   PLAYS   IN   DETERMINING  OVERALL  NETWORK
  1021.  
  1022. PERFORMANCE.
  1023.  
  1024.  
  1025.  
  1026.  
  1027. 4.1  Buffering for Output
  1028.  
  1029.  
  1030.         We now consider, in general, which sorts of processes  in
  1031.  
  1032. the  network  nodes  need  to  have  buffers  dedicated  to them.
  1033.  
  1034. Whenever a particular device is running at close to  its  maximum
  1035.  
  1036. capacity  and  the demands on the device vary stochastically, the
  1037.  
  1038. device will sometimes  be  overloaded.   That  is,  although  the
  1039.  
  1040.  
  1041.  
  1042.                               -16-
  1043.  
  1044.  
  1045. IEN-182                              Bolt Beranek and Newman Inc.
  1046.                                                     Eric C. Rosen
  1047.  
  1048.  
  1049.  
  1050. device  is fully utilized during some interval by the presence of
  1051.  
  1052. n packets, a larger number of packets destined  for  that  device
  1053.  
  1054. will arrive during that interval.  If the device is overloaded in
  1055.  
  1056. the steady state, then some sort of congestion control  procedure
  1057.  
  1058. must  be  brought  into  effect  to  reduce  the  demand for that
  1059.  
  1060. particular device.  We are presently assuming, though,  that  the
  1061.  
  1062. device  is  not  overloaded  in  the  steady  state, and that any
  1063.  
  1064. intervals of overload are caused by the variance in  the  demand.
  1065.  
  1066. In such a situation, it is desirable to smooth the effects of the
  1067.  
  1068. temporary overload by  buffering  the  excess  packets.   So  the
  1069.  
  1070. buffer management system should allow more buffers to be assigned
  1071.  
  1072. to an output device at a given time than are strictly  needed  to
  1073.  
  1074. run  that  device  at  full  capacity.  The question is whether a
  1075.  
  1076. certain number of excess buffers should be  "dedicated"  to  each
  1077.  
  1078. device  (in  the  sense  described  above), or whether the excess
  1079.  
  1080. buffers should be in a common pool, sharable among all the output
  1081.  
  1082. devices  on  a  first-come, first-served basis.  In this case, it
  1083.  
  1084. seems that the buffers  ought  to  be  sharable.   If  all  these
  1085.  
  1086. buffers  end up queued to a single output device, no other device
  1087.  
  1088. is thereby prevented from  running  at  full  speed,  since  each
  1089.  
  1090. device  still has its own supply of dedicated buffers.  Therefore
  1091.  
  1092. there is no reason to strictly partition this  additional  buffer
  1093.  
  1094. space.
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.                               -17-
  1101.  
  1102.  
  1103. IEN-182                              Bolt Beranek and Newman Inc.
  1104.                                                     Eric C. Rosen
  1105.  
  1106.  
  1107.  
  1108.         One might argue that the number of buffers dedicated to a
  1109.  
  1110. particular  device should only be enough to run the device at its
  1111.  
  1112. AVERAGE rate, not at its maximum or peak rate.   After  all,  the
  1113.  
  1114. purpose  of having a sharable pool of excess buffers is to smooth
  1115.  
  1116. the effects of stochastic  peaks.   But  stochastic  peaks  occur
  1117.  
  1118. whenever  the  average  utilization  of a device is exceeded, not
  1119.  
  1120. necessarily when  its  maximum  utilization  is  exceeded.   This
  1121.  
  1122. argument,  however,  ignores  the  fact  that several devices may
  1123.  
  1124. exceed their average utilization  at  the  same  time.   If  this
  1125.  
  1126. happens,  and  if  there are not enough buffers dedicated to each
  1127.  
  1128. device to run it at full speed, then some devices may  be  under-
  1129.  
  1130. utilized  while  others  will be over-utilized, which is what the
  1131.  
  1132. buffer management scheme ought to try avoid as  far  as  possible
  1133.  
  1134. (at least, if the supply of buffers is ample).
  1135.  
  1136.  
  1137.  
  1138.  
  1139.  
  1140. 4.2  Buffering for Input
  1141.  
  1142.  
  1143.         We have yet  to  discuss  the  issue  of  whether  it  is
  1144.  
  1145. necessary to dedicate buffers to the input devices, as well as to
  1146.  
  1147. the output devices. Packets may arrive at a node  either  from  a
  1148.  
  1149. neighboring node, or from a locally-attached host.  Receiving and
  1150.  
  1151. processing a packet  requires  a  buffer.   Even  if  all  output
  1152.  
  1153. devices  are running at full speed and have their full complement
  1154.  
  1155.  
  1156.  
  1157.  
  1158.                               -18-
  1159.  
  1160.  
  1161. IEN-182                              Bolt Beranek and Newman Inc.
  1162.                                                     Eric C. Rosen
  1163.  
  1164.  
  1165.  
  1166. of buffers, it is still necessary to dedicate a certain number of
  1167.  
  1168. additional  buffers  to  the input devices.  Failure to do so can
  1169.  
  1170. result in the stopping of  all  input  whenever  all  the  output
  1171.  
  1172. devices  are  fully  utilized.   At first glance, this might seem
  1173.  
  1174. like a desirable  effect.   After  all,  there  is  no  point  in
  1175.  
  1176. accepting  input  when the output devices are already overloaded;
  1177.  
  1178. to do so only  leads  to  congestion.   However,  there  are  two
  1179.  
  1180. problems with this argument:
  1181.  
  1182.  
  1183.      1)  Not all packets which arrive at a  node  as  input  will
  1184.  
  1185.          necessarily  leave the node as output.  Some packets are
  1186.  
  1187.          control packets which may cause the  processor  to  take
  1188.  
  1189.          some  action  other  than  simply  forwarding the packet
  1190.  
  1191.          somewhere else.  The  node  should  always  be  able  to
  1192.  
  1193.          process these packets, no matter what the utilization of
  1194.  
  1195.          its output devices.
  1196.  
  1197.  
  1198.      2)  Packets cannot be processed  instantaneously;  there  is
  1199.  
  1200.          always  some  latency.  It may be the case that although
  1201.  
  1202.          no output buffers are available at  the  time  a  packet
  1203.  
  1204.          arrives, there will be buffers available by the time the
  1205.  
  1206.          packet is processed (e.g., by  the  time  the  processor
  1207.  
  1208.          determines  which output device to route the packet to).
  1209.  
  1210.          If no buffers are available at the time  the  packet  is
  1211.  
  1212.          received,  it  has  to  be discarded and re-transmitted,
  1213.  
  1214.  
  1215.  
  1216.                               -19-
  1217.  
  1218.  
  1219. IEN-182                              Bolt Beranek and Newman Inc.
  1220.                                                     Eric C. Rosen
  1221.  
  1222.  
  1223.  
  1224.          thus  introducing  a   potentially   large   amount   of
  1225.  
  1226.          additional   delay.    This   additional  delay  can  be
  1227.  
  1228.          eliminated by having a supply of buffers for input.
  1229.  
  1230.  
  1231.         These arguments show that there should  be  some  buffers
  1232.  
  1233. available  for  input  over and above those which can be used for
  1234.  
  1235. output.  We have not yet  dealt  with  the  issues  of  how  many
  1236.  
  1237. buffers  there  should  be,  and  whether they should be sharable
  1238.  
  1239. among all the input devices.   It  is  sometimes  suggested  that
  1240.  
  1241. there  should  be  two buffers dedicated to each input device, to
  1242.  
  1243. allow "double  buffering."   However,  this  is  something  of  a
  1244.  
  1245. confusion.  The point of double buffering is to allow an input to
  1246.  
  1247. be received while the previous input is  being  processed.   This
  1248.  
  1249. makes sense if the time it takes to process the previous input is
  1250.  
  1251. less than the time it takes to receive the current  input.   Then
  1252.  
  1253. by the time the input is received, processing of the previous one
  1254.  
  1255. has been completed, and the buffer which held the previous  input
  1256.  
  1257. can be re-used to receive the next input, while the current input
  1258.  
  1259. is being processed.  The purpose of such a scheme  is  to  ensure
  1260.  
  1261. that reception of an input is not delayed by the time it takes to
  1262.  
  1263. process the previous input.  It is easy to see though  that  this
  1264.  
  1265. scheme  is  not  directly  applicable to a packet-switching node.
  1266.  
  1267. There is no way to guarantee that the time needed to process  one
  1268.  
  1269. packet  is  less than the time needed to receive the next packet.
  1270.  
  1271.  
  1272.  
  1273.  
  1274.                               -20-
  1275.  
  1276.  
  1277. IEN-182                              Bolt Beranek and Newman Inc.
  1278.                                                     Eric C. Rosen
  1279.  
  1280.  
  1281.  
  1282. If the processor is busy, so that many packets are queued for it,
  1283.  
  1284. and  the  inter-node  trunks run at a high speed, so that packets
  1285.  
  1286. are received very rapidly, merely dedicating two  buffers  to  an
  1287.  
  1288. input device will not ensure that a buffer is always available to
  1289.  
  1290. receive the next packet.
  1291.  
  1292.  
  1293.         One might think that this means that a larger  number  of
  1294.  
  1295. buffers  must  be  dedicated  to  each input line.  By making the
  1296.  
  1297. number large enough, we can make the probability  of  missing  an
  1298.  
  1299. input  due  to lack of buffers as small as we like.  But it would
  1300.  
  1301. be a mistake to do so.  In general (though not invariably), after
  1302.  
  1303. a packet is input and processed, it will be routed to some output
  1304.  
  1305. device.  There cannot be a shortage of buffers for  input  unless
  1306.  
  1307. either  all  the output devices are heavily loaded (i.e., all the
  1308.  
  1309. output-dedicated buffers are in use), or the processor itself  is
  1310.  
  1311. overloaded  (so  that many buffers are queued for the processor).
  1312.  
  1313. A certain number of input-dedicated buffers are needed to  permit
  1314.  
  1315. input  to  flow  smoothly  under  such  situations, as well as to
  1316.  
  1317. ensure that control packets can be processed.   However,  if  the
  1318.  
  1319. node  is really congested (i.e., either the output devices or the
  1320.  
  1321. CPU are overutilized in the steady state), having a large  number
  1322.  
  1323. of input buffers will not smooth the flow; it will result only in
  1324.  
  1325. larger queues.  The number of input-dedicated buffers  need  only
  1326.  
  1327. be  large  enough  to  enable  the  processor  to run at its full
  1328.  
  1329.  
  1330.  
  1331.  
  1332.                               -21-
  1333.  
  1334.  
  1335. IEN-182                              Bolt Beranek and Newman Inc.
  1336.                                                     Eric C. Rosen
  1337.  
  1338.  
  1339.  
  1340. capacity while the  output  devices  are  also  running  at  full
  1341.  
  1342. capacity.  In order for an output device to run at full capacity,
  1343.  
  1344. it should always be able to get enough buffers  so  that  it  can
  1345.  
  1346. buffer  all  in-flight   packets  for the required period of time
  1347.  
  1348. while still having a small queue of packets waiting to  be  sent.
  1349.  
  1350. Running  the processor at full speed requires only enough buffers
  1351.  
  1352. so that a small number of packets can always be on the queue  for
  1353.  
  1354. the  processor.   This does not require a large number of buffers
  1355.  
  1356. to be dedicated to input; even  less  does  it  require  a  large
  1357.  
  1358. number  of  buffers to be dedicated to a particular input device.
  1359.  
  1360. However, as we have pointed out, it does require  SOME  dedicated
  1361.  
  1362. buffers.
  1363.  
  1364.  
  1365.         We have now determined that there  need  not  be  a  very
  1366.  
  1367. large  number  of  buffers  dedicated  to input.  We have not yet
  1368.  
  1369. resolved the question of whether these buffers should be sharable
  1370.  
  1371. among  all  the  input  devices,  or  whether a certain number of
  1372.  
  1373. buffers should be dedicated to each input device.  To answer this
  1374.  
  1375. question  we must determine whether, if the buffers are sharable,
  1376.  
  1377. some one input device can monopolize the buffer pool,  preventing
  1378.  
  1379. input  from  any  of  the  other devices.  This might well be the
  1380.  
  1381. case, for three reasons.  First, one input device might run at  a
  1382.  
  1383. higher  speed than the others.  Second, one input device might be
  1384.  
  1385. more heavily utilized than the others, or might  receive  shorter
  1386.  
  1387.  
  1388.  
  1389.  
  1390.                               -22-
  1391.  
  1392.  
  1393. IEN-182                              Bolt Beranek and Newman Inc.
  1394.                                                     Eric C. Rosen
  1395.  
  1396.  
  1397.  
  1398. packets  than  the others.  Third, some artifact of the interrupt
  1399.  
  1400. structure of the node might tend to favor  certain  devices  over
  1401.  
  1402. others.   (Thus  in the ARPANET, each inter-IMP trunk is serviced
  1403.  
  1404. at a  different  priority  level;  naturally,  the  one  that  is
  1405.  
  1406. serviced  with  the  highest priority is favored.  This is due to
  1407.  
  1408. the interrupt structure of the 316, rather  than  the  software.)
  1409.  
  1410. If  any  of these conditions hold, some input devices may be able
  1411.  
  1412. to utilize so many buffers  that  the  others  are  slowed  down.
  1413.  
  1414. Therefore  a  small number of buffers should be dedicated to each
  1415.  
  1416. input device.
  1417.  
  1418.  
  1419.         Another reason for dedicating a few buffers to each input
  1420.  
  1421. device  is the following.  Certain inputs are processed at a very
  1422.  
  1423. high priority level,  without  any  queuing  for  the  processor.
  1424.  
  1425. These  inputs  are always control packets, which are not going to
  1426.  
  1427. be routed to any output device.  Furthermore, they are only those
  1428.  
  1429. few  types  of  control  packets  which  must  be  processed very
  1430.  
  1431. quickly.  An example is the line up/down protocol packet  of  the
  1432.  
  1433. ARPANET.   When one IMP sends one of these packets to another, it
  1434.  
  1435. expects a reply back within a few hundred milliseconds, no matter
  1436.  
  1437. how  congested  the  processor  of  the  receiving  IMP  is.  The
  1438.  
  1439. receiving IMP must always be able to receive such packets and  to
  1440.  
  1441. process  them immediately, without having to queue them.  If this
  1442.  
  1443. is not done, the line may be brought down  spuriously,  resulting
  1444.  
  1445.  
  1446.  
  1447.  
  1448.                               -23-
  1449.  
  1450.  
  1451. IEN-182                              Bolt Beranek and Newman Inc.
  1452.                                                     Eric C. Rosen
  1453.  
  1454.  
  1455.  
  1456. in a significant and needless degradation of network service.  In
  1457.  
  1458. order to ensure rapid processing, at least  one  buffer  must  be
  1459.  
  1460. dedicated to each input device from which control packets of this
  1461.  
  1462. sort may be received.  Furthermore, the use of these  buffers  is
  1463.  
  1464. even  more restricted than that of other buffers which are input-
  1465.  
  1466. dedicated.  Ordinarily, to say that N buffers  are  dedicated  to
  1467.  
  1468. input  is to say that there must always be N buffers which cannot
  1469.  
  1470. be given to any  process  which  is  not  input  related.   These
  1471.  
  1472. buffers  can,  however,  be queued to the processor (i.e., to the
  1473.  
  1474. Dispatcher) after being filled with an  input.   After  all,  the
  1475.  
  1476. main  point  of  having  input-dedicated buffers is to enable the
  1477.  
  1478. processor to continue to  look  at  inputs  even  if  all  output
  1479.  
  1480. devices  are  running  at  full  capacity.   This  goal cannot be
  1481.  
  1482. achieved  unless  the  input  buffers  can  be  queued  for   the
  1483.  
  1484. processor.   The  point  of this paragraph, on the other hand, is
  1485.  
  1486. that there be certain sorts  of  control  packets  which  require
  1487.  
  1488. IMMEDIATE processing.  In order to ensure that a buffer is always
  1489.  
  1490. available to each input device  to  process  such  packets,  each
  1491.  
  1492. input  device should have one buffer dedicated to it which is not
  1493.  
  1494. queueable to ANY other process, including the Dispatcher.   Is  a
  1495.  
  1496. single  such  buffer enough?  The feasibility of having protocols
  1497.  
  1498. which require immediate processing of control packets is  clearly
  1499.  
  1500. dependent  on  the  constraint  that such packets be few and far-
  1501.  
  1502. between.  Otherwise, there may  just  be  too  many  of  them  to
  1503.  
  1504.  
  1505.  
  1506.                               -24-
  1507.  
  1508.  
  1509. IEN-182                              Bolt Beranek and Newman Inc.
  1510.                                                     Eric C. Rosen
  1511.  
  1512.  
  1513.  
  1514. process  them  all "immediately," and the protocol will not work.
  1515.  
  1516. As long as this constraint is met,  a  single  buffer  should  be
  1517.  
  1518. enough.
  1519.  
  1520.  
  1521.         It must be pointed out that the proper use  of  the  non-
  1522.  
  1523. queueable  buffer  is often a matter of some subtlety.  Suppose a
  1524.  
  1525. packet is received from some inter-node trunk,  and  that  packet
  1526.  
  1527. contains  node-node  acknowledgments  (possibly piggybacked on an
  1528.  
  1529. ordinary data packet) for packets that were transmitted  (in  the
  1530.  
  1531. opposite  direction)  over  the same trunk.  Suppose further that
  1532.  
  1533. after the packet is received, there are no more free  buffers  in
  1534.  
  1535. the  nodes.  Clearly, any data in the packet cannot be processed;
  1536.  
  1537. doing so would require queuing  the  packet  for  the  processor,
  1538.  
  1539. thereby  violating  the  rule  that each input device have a non-
  1540.  
  1541. queueable  buffer   dedicated   to   it.    But   what   of   the
  1542.  
  1543. acknowledgments  --  should  they  be processed?  In the ARPANET,
  1544.  
  1545. received node-node acknowledgments are processed at  the  highest
  1546.  
  1547. priority  level,  with  no  queuing.   So  they  CAN be processed
  1548.  
  1549. without violating  the  buffer  management  rules  that  we  have
  1550.  
  1551. advanced.   Furthermore,  one  might  argue  that  it  is  really
  1552.  
  1553. important to process the acknowledgments  as  soon  as  possible.
  1554.  
  1555. After  all,  processing  received  acknowledgments  can result in
  1556.  
  1557. freeing buffers.  Since, ex hypothesi, there are  very  few  free
  1558.  
  1559. buffers  in  the  machine,  processing  the acknowledgments is of
  1560.  
  1561.  
  1562.  
  1563.  
  1564.                               -25-
  1565.  
  1566.  
  1567. IEN-182                              Bolt Beranek and Newman Inc.
  1568.                                                     Eric C. Rosen
  1569.  
  1570.  
  1571.  
  1572. great importance, and should be done immediately.  This argument,
  1573.  
  1574. however, does not hold under all conditions.  When there are very
  1575.  
  1576. few free buffers in the node, it may be that a  large  number  of
  1577.  
  1578. buffers  are  holding packets which have already been transmitted
  1579.  
  1580. on inter-node trunks, and which are awaiting acknowledgment.   In
  1581.  
  1582. this  case, processing the acknowledgments as quickly as possible
  1583.  
  1584. has a salutary effect on the node's performance.  However,  there
  1585.  
  1586. are  other  conditions which may result in a short supply of free
  1587.  
  1588. buffers.  Suppose, for example, that the node is CPU-bound, i.e.,
  1589.  
  1590. that  the processor is overloaded.  Then one would expect to find
  1591.  
  1592. the  majority  of  buffers  queued  for  the  processor.    (This
  1593.  
  1594. situation  is  very  common in certain of the more heavily loaded
  1595.  
  1596. ARPANET nodes.)  Since these buffers contain packets  which  have
  1597.  
  1598. not  yet  been  transmitted out any inter-node trunk, the buffers
  1599.  
  1600. cannot  possibly   be   freed   as   a   result   of   processing
  1601.  
  1602. acknowledgments.   The  only way to expedite the freeing of these
  1603.  
  1604. buffers is to reduce the demand on the processor, especially  the
  1605.  
  1606. demand  at  the  higher  priority levels.  Thus the best strategy
  1607.  
  1608. here may be to NOT process the acknowledgments, thereby  reducing
  1609.  
  1610. the processing load.  Deciding whether a certain packet should be
  1611.  
  1612. processed immediately may depend not only on the function of  the
  1613.  
  1614. packet,  but  on  the  conditions in the node at that time.  This
  1615.  
  1616. shows again that a buffer management scheme is  only  part  of  a
  1617.  
  1618. more  general congestion control strategy, and cannot be expected
  1619.  
  1620.  
  1621.  
  1622.                               -26-
  1623.  
  1624.  
  1625. IEN-182                              Bolt Beranek and Newman Inc.
  1626.                                                     Eric C. Rosen
  1627.  
  1628.  
  1629.  
  1630. to do the whole job by itself.
  1631.  
  1632.  
  1633.         It must be  understood,  of  course,  that  although  the
  1634.  
  1635. number  of buffers DEDICATED to input may be small, the number of
  1636.  
  1637. buffers controlled by the input processes  (i.e.  the  number  of
  1638.  
  1639. buffers   containing  input  packets  which  have  not  yet  been
  1640.  
  1641. dispatched) may be much larger.  In fact, all  the  buffers  that
  1642.  
  1643. are  dedicated  to  output  processes may be under the control of
  1644.  
  1645. input processes at some time.  This may seem paradoxical, but  it
  1646.  
  1647. is  easy  to see why it is the case.  In general, a packet cannot
  1648.  
  1649. be output unless it has first been input.  It makes no  sense  to
  1650.  
  1651. refuse to use a buffer for input because one wants to save it for
  1652.  
  1653. output -- it will never be used for output unless it is used  for
  1654.  
  1655. input first.  Therefore, all buffers must be available for input,
  1656.  
  1657. regardless  of  the  number  which  are  "dedicated"   to   other
  1658.  
  1659. processes.   (There  is  one  exception  to this rule.  It may be
  1660.  
  1661. desirable to save a few buffers for  creating  control  messages,
  1662.  
  1663. which,  being  created  in  the  node,  are never actually input.
  1664.  
  1665. These buffers would then  be  unavailable  for  input.   This  is
  1666.  
  1667. discussed  below  in  greater  detail.)   To restate the point --
  1668.  
  1669. while only a small number of buffers  need  to  be  DEDICATED  to
  1670.  
  1671. input, a large number of buffers need to be AVAILABLE to input.
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.                               -27-
  1681.  
  1682.  
  1683. IEN-182                              Bolt Beranek and Newman Inc.
  1684.                                                     Eric C. Rosen
  1685.  
  1686.  
  1687.  
  1688. 4.3  Buffering for Generating Control Messages
  1689.  
  1690.  
  1691.         There are other functions besides input  and  output  for
  1692.  
  1693. which buffers are required.  One such function is the creation of
  1694.  
  1695. the control messages needed to run the various protocols used  by
  1696.  
  1697. the  node.   Every  so  often, the node will have to respond to a
  1698.  
  1699. certain event by creating a control packet and transmitting it to
  1700.  
  1701. some  destination.   Often  one  node  will contain buffers which
  1702.  
  1703. cannot be freed until a control packet from some  other  node  is
  1704.  
  1705. received.   If a node cannot create the necessary control packets
  1706.  
  1707. because it cannot  get  buffers  for  them,  then  deadlocks  are
  1708.  
  1709. possible.    Even   if   deadlocks   are  avoided,  good  network
  1710.  
  1711. performance can depend on the timely creation and transmission of
  1712.  
  1713. control  packets.   Nodes  which  have  high  buffer  utilization
  1714.  
  1715. because they are handling many data packets ought not to be at  a
  1716.  
  1717. disadvantage  when  it  comes  to  obtaining  buffers in which to
  1718.  
  1719. create control packets.  Indeed, it is just such nodes which  are
  1720.  
  1721. most  likely  to  have  the  largest  number  of protocol-imposed
  1722.  
  1723. responsibilities, and hence to have the greatest need for buffers
  1724.  
  1725. in which to create control messages.  In order to ensure that the
  1726.  
  1727. flow of control messages is  not  slowed  by  the  flow  of  data
  1728.  
  1729. packets,  each  node  should  have  a supply of buffers dedicated
  1730.  
  1731. solely to the function of creating control messages.
  1732.  
  1733.  
  1734.  
  1735.  
  1736.  
  1737.  
  1738.                               -28-
  1739.  
  1740.  
  1741. IEN-182                              Bolt Beranek and Newman Inc.
  1742.                                                     Eric C. Rosen
  1743.  
  1744.  
  1745.  
  1746. 4.4  Buffering Data at the Source Node
  1747.  
  1748.  
  1749.         In many packet-switching networks, packets received  from
  1750.  
  1751. a  host  are  buffered  at  the  source  node  until  an  end-end
  1752.  
  1753. acknowledgment is  received.   (This  is  true  of  single-packet
  1754.  
  1755. messages  in  the ARPANET.) An insufficient supply of buffers for
  1756.  
  1757. this purpose will hold the throughput  of  the  locally  attached
  1758.  
  1759. hosts  to  an  artificially  low level.  Furthermore, the holding
  1760.  
  1761. time of a buffer which must await an  end-end  acknowledgment  is
  1762.  
  1763. very  long,  relative to the holding time of other buffers.  This
  1764.  
  1765. implies that the number of buffers needed to serve  the  function
  1766.  
  1767. might be quite large, if an adequate level of throughput is to be
  1768.  
  1769. maintained.  A basic principle of congestion  control  in  packet
  1770.  
  1771. switching  networks  is  that  packets  which  are already in the
  1772.  
  1773. network should not be unduly interfered with by packets which are
  1774.  
  1775. entering  the network.  The buffer management scheme we have been
  1776.  
  1777. outlining applies this principle by dedicating pools  of  buffers
  1778.  
  1779. to  each  output  device  and  to the various protocol functions.
  1780.  
  1781. That is, the scheme ensures that  local  inputs  cannot  hog  the
  1782.  
  1783. buffer  space at a node, which would result in degrading the flow
  1784.  
  1785. of traffic through the node.  There is a question, however, as to
  1786.  
  1787. whether  there should be a pool of buffers DEDICATED to buffering
  1788.  
  1789. input packets at the source node, or whether this function should
  1790.  
  1791. compete  with  other functions for a sharable buffer pool.  Since
  1792.  
  1793.  
  1794.  
  1795.  
  1796.                               -29-
  1797.  
  1798.  
  1799. IEN-182                              Bolt Beranek and Newman Inc.
  1800.                                                     Eric C. Rosen
  1801.  
  1802.  
  1803.  
  1804. we have already assigned dedicated buffer pools  to  those  other
  1805.  
  1806. functions  that  need  them,  the only possible bad result of not
  1807.  
  1808. dedicating a pool of buffers for source buffering of local inputs
  1809.  
  1810. would  be  that  these other functions would be able to hold down
  1811.  
  1812. the throughput  due  to  local  hosts,  by  taking  most  of  the
  1813.  
  1814. buffering  for  themselves.  It is sometimes thought that this is
  1815.  
  1816. actually a good feature.  That is, if  the  node  is  so  heavily
  1817.  
  1818. loaded  with transit traffic and with traffic destined for output
  1819.  
  1820. to local hosts, perhaps it is good to reduce the amount of buffer
  1821.  
  1822. space  available  for  source  buffering.   After  all,  when the
  1823.  
  1824. network is heavily loaded, one does  want  to  reduce  the  input
  1825.  
  1826. rate,   and  reducing  the  buffer  space  available  for  source
  1827.  
  1828. buffering  of  input  will  have  this  effect.   This  argument,
  1829.  
  1830. however,  ignores  fairness  considerations.  In the ARPANET, for
  1831.  
  1832. example, there are a few nodes which, because  they  are  on  the
  1833.  
  1834. major  cross-country  paths,  have a much greater load of transit
  1835.  
  1836. traffic than does the vast majority  of  nodes.   However,  these
  1837.  
  1838. nodes  which  are  heavily  loaded with transit traffic also have
  1839.  
  1840. local hosts and TIPs.  The users of these local  hosts  and  TIPs
  1841.  
  1842. have a right to the same service as is given to users whose local
  1843.  
  1844. IMPs do not have a heavy load of transit traffic.  If  the  heavy
  1845.  
  1846. load  of transit traffic at these nodes is allowed to get so much
  1847.  
  1848. buffer space that the throughput obtainable by the local users is
  1849.  
  1850. degraded,  then  users  at these nodes are at a disadvantage with
  1851.  
  1852.  
  1853.  
  1854.                               -30-
  1855.  
  1856.  
  1857. IEN-182                              Bolt Beranek and Newman Inc.
  1858.                                                     Eric C. Rosen
  1859.  
  1860.  
  1861.  
  1862. respect to users at other nodes.  This is hardly  fair.   If  the
  1863.  
  1864. transit  load  at  some node is "too heavy," then ALL users which
  1865.  
  1866. are sending traffic through that node should be forced to  reduce
  1867.  
  1868. their  input  rate,  not  just the users who happen to be locally
  1869.  
  1870. attached to that node.  Of course, this effect cannot be achieved
  1871.  
  1872. merely   by  buffer  management.   It  requires  a  more  general
  1873.  
  1874. congestion control scheme.  Our  present  point  though  is  that
  1875.  
  1876. since  a heavy transit load should not be permitted by itself (in
  1877.  
  1878. the absence of instructions from a congestion control scheme)  to
  1879.  
  1880. degrade  the  throughput  of  local users, a non-sharable pool of
  1881.  
  1882. buffers should be dedicated to the function  of  buffering  local
  1883.  
  1884. input while awaiting end-end acknowledgments.  Of course, as long
  1885.  
  1886. as the transit traffic at some node must compete with  the  input
  1887.  
  1888. traffic  at  that  node  for  some  resource  (even  if  only the
  1889.  
  1890. processor), there will always be a  certain  amount  of  "unfair"
  1891.  
  1892. interference.  A good buffer management scheme can limit, but not
  1893.  
  1894. eliminate, the effect.
  1895.  
  1896.  
  1897.         It is important to note that this point can  be  obscured
  1898.  
  1899. by   certain   assumptions  of  homogeneity  which  it  is  often
  1900.  
  1901. convenient  to  make  when  analyzing  or  simulating  a   buffer
  1902.  
  1903. management  system.   When trying to perform such analysis, it is
  1904.  
  1905. often convenient to create a network model in which the ratio  of
  1906.  
  1907. transit  traffic to input traffic is the same at all nodes.  Once
  1908.  
  1909.  
  1910.  
  1911.  
  1912.                               -31-
  1913.  
  1914.  
  1915. IEN-182                              Bolt Beranek and Newman Inc.
  1916.                                                     Eric C. Rosen
  1917.  
  1918.  
  1919.  
  1920. one has made that assumption, it is clear that  the  question  of
  1921.  
  1922. fairness  will not arise, since all nodes will be equally loaded,
  1923.  
  1924. and input at all nodes will be equally  constrained.   Therefore,
  1925.  
  1926. if one has made that assumption, it may seem reasonable to design
  1927.  
  1928. a buffer management scheme which allows transit traffic  to  lock
  1929.  
  1930. out  locally  input traffic entirely.  Assumptions of homogeneity
  1931.  
  1932. beg the question of fairness, and in doing so lead to  congestion
  1933.  
  1934. control   or   buffer  management  schemes  which  are  seriously
  1935.  
  1936. deficient.
  1937.  
  1938.  
  1939.  
  1940.  
  1941.  
  1942. 5  Buffer Management with a Shortage of Buffers (ARPANET)
  1943.  
  1944.  
  1945.         We have so far been discussing the issues that  arise  in
  1946.  
  1947. the  design  of  a  buffer management scheme for a node which has
  1948.  
  1949. ample buffer space.  We have argued that good  buffer  management
  1950.  
  1951. is  important  for  good  network performance, no matter how many
  1952.  
  1953. buffers exist in a node.  Our basic approach has been to dedicate
  1954.  
  1955. enough  buffers  to each function which requires them so that all
  1956.  
  1957. such functions can be performed at full speed, with  the  minimum
  1958.  
  1959. amount of interference from other functions.  The assumption that
  1960.  
  1961. there is an "ample" supply of buffer space is just the assumption
  1962.  
  1963. that there exist enough buffers to do this.  Any excess amount of
  1964.  
  1965. buffers should be sharable among several functions, and should be
  1966.  
  1967.  
  1968.  
  1969.  
  1970.                               -32-
  1971.  
  1972.  
  1973. IEN-182                              Bolt Beranek and Newman Inc.
  1974.                                                     Eric C. Rosen
  1975.  
  1976.  
  1977.  
  1978. used  to smooth the effects of stochastic peak loads or processor
  1979.  
  1980. latency.
  1981.  
  1982.  
  1983.         We turn now to the issues that  must  be  addressed  when
  1984.  
  1985. designing  a  buffer  management scheme for a node which does NOT
  1986.  
  1987. have ample buffer  space.   Our  main  interest  will  be  buffer
  1988.  
  1989. management  in the 316/516 IMP, which is severely memory-limited.
  1990.  
  1991. However, our discussion will also have application to the  design
  1992.  
  1993. of  a  buffer  management  scheme  for new networks which are not
  1994.  
  1995. expected to be memory-limited.  It is often thought that networks
  1996.  
  1997. designed  with  present  technology will always have ample buffer
  1998.  
  1999. space, since memory is now one of the cheapest  components  of  a
  2000.  
  2001. computer.   This  is  somewhat  of an oversimplification, though.
  2002.  
  2003. However cheap memory is, it is always cheaper to have  less.   We
  2004.  
  2005. would  not  expect  nodes  to  be designed with arbitrarily large
  2006.  
  2007. amounts of buffer space.  Rather, the amount of memory configured
  2008.  
  2009. into  a  node  will  generally  be  determined by making a sizing
  2010.  
  2011. decision based both on economics and on the design objectives  of
  2012.  
  2013. the  node.   Yet  at  the  present  state of the art, making such
  2014.  
  2015. sizing decisions is more of an  art  than  a  science,  and  such
  2016.  
  2017. decisions   can   easily   be  wrong.   Furthermore,  future  re-
  2018.  
  2019. configurations of the network, e.g., adding long-delay or  higher
  2020.  
  2021. speed  lines,  can invalidate the original sizing decisions.  Yet
  2022.  
  2023. the addressing, mapping, or bus structure  of  the  computer  may
  2024.  
  2025.  
  2026.  
  2027.  
  2028.                               -33-
  2029.  
  2030.  
  2031. IEN-182                              Bolt Beranek and Newman Inc.
  2032.                                                     Eric C. Rosen
  2033.  
  2034.  
  2035.  
  2036. make  it  difficult or impossible to freely add additional memory
  2037.  
  2038. to the initial configuration.  It is never  good  to  assume,  in
  2039.  
  2040. network design, that buffer space will always be ample throughout
  2041.  
  2042. the life of the network.  For these reasons,  our  discussion  of
  2043.  
  2044. buffer management in the ARPANET should have wider application.
  2045.  
  2046.  
  2047.         In the ARPANET, each Honeywell 316/516 IMP has between 30
  2048.  
  2049. and  35  buffers,  depending on the configuration of the node and
  2050.  
  2051. the presence or absence of  various  optional  software  packages
  2052.  
  2053. (which,  when  present,  reside  in  an  area of memory otherwise
  2054.  
  2055. devoted to buffer space).  This is nowhere  near  the  amount  of
  2056.  
  2057. buffers needed to ensure that all processes requiring buffers can
  2058.  
  2059. run at full speed.  A sensible approach in  such  a  case  is  to
  2060.  
  2061. dedicate  to  each process enough buffers to allow the process to
  2062.  
  2063. run at only a fraction of full speed, while making the additional
  2064.  
  2065. buffers  sharable.   However,  unless  there  are enough sharable
  2066.  
  2067. buffers to enable some of the processes to sometimes run at  full
  2068.  
  2069. speed,  the  scheme will prevent any process from EVER running at
  2070.  
  2071. full speed, even when there  are  a  sufficient  number  of  idle
  2072.  
  2073. buffers.   This  would  be  a very undesirable situation.  With a
  2074.  
  2075. severely memory-limited node,  as  in  the  ARPANET,  it  may  be
  2076.  
  2077. necessary  to  dedicate  to  a process only the minimum number of
  2078.  
  2079. buffers required to ensure that the process can run at all (i.e.,
  2080.  
  2081. to   prevent  a  deadlock  situation  in  which  the  process  is
  2082.  
  2083.  
  2084.  
  2085.  
  2086.                               -34-
  2087.  
  2088.  
  2089. IEN-182                              Bolt Beranek and Newman Inc.
  2090.                                                     Eric C. Rosen
  2091.  
  2092.  
  2093.  
  2094. completely locked out).  THIS MEANS THAT MUCH OF THE  ABILITY  OF
  2095.  
  2096. THE  BUFFER  MANAGEMENT  SCHEME TO PROTECT ONE PROCESS FROM UNDUE
  2097.  
  2098. INTERFERENCE BY ANOTHER IS LOST.  The price  for  retaining  that
  2099.  
  2100. ability  would  be  to  guarantee slow performance by some of the
  2101.  
  2102. processes, even while resources (buffers) lie idle.  Such a price
  2103.  
  2104. may be too high to pay.
  2105.  
  2106.  
  2107.         To put this point another way, we  must  worry  not  only
  2108.  
  2109. about  under-control  of  the  buffer space, but also about over-
  2110.  
  2111. control.  If buffer space is under-controlled,  one  process  can
  2112.  
  2113. hog  the  buffers,  preventing other processes from getting their
  2114.  
  2115. fair share.  If buffer space is over-controlled, then  a  process
  2116.  
  2117. may  be  limited  to a particular proportion of the buffer space,
  2118.  
  2119. even if granting  it  a  larger  proportion  in  some  particular
  2120.  
  2121. situation  may  be  the  best  strategy from the point of view of
  2122.  
  2123. overall network performance.   With  ample  buffer  space,  over-
  2124.  
  2125. control  is  not generally a problem, since every process can get
  2126.  
  2127. as many buffers as  it  needs.   When  buffer  space  is  scarce,
  2128.  
  2129. however,  strict  and  inflexible  limitations  on  the amount of
  2130.  
  2131. buffer space that can  be  under  the  control  of  a  particular
  2132.  
  2133. process  may  result  in no process ever being able to get enough
  2134.  
  2135. buffers to perform well.  A loosening  of  the  controls  may  be
  2136.  
  2137. necessary  in  such  cases.  As we shall see, the current ARPANET
  2138.  
  2139. buffer  management  scheme  suffers  from  over-control  in  some
  2140.  
  2141.  
  2142.  
  2143.  
  2144.                               -35-
  2145.  
  2146.  
  2147. IEN-182                              Bolt Beranek and Newman Inc.
  2148.                                                     Eric C. Rosen
  2149.  
  2150.  
  2151.  
  2152. instances.
  2153.  
  2154.  
  2155.         In the ARPANET, the situation is even worse.   There  are
  2156.  
  2157. not  enough buffers available to dedicate even the minimum amount
  2158.  
  2159. to certain processes.  For example, one  process  which  requires
  2160.  
  2161. buffers is the process governing output to a host, of which there
  2162.  
  2163. may be four attached to each node.  An ARPANET message may be  up
  2164.  
  2165. to 8 packets long (i.e., may occupy up to 8 buffers).  Before any
  2166.  
  2167. message can be delivered to a host, all  eight  packets  must  be
  2168.  
  2169. present,  so  that the message can be "reassembled."  There is no
  2170.  
  2171. point to dedicating fewer than 8 buffers to each host, since that
  2172.  
  2173. would  not  guarantee  that  enough  buffer space would always be
  2174.  
  2175. available to deliver a message to the host.  On the  other  hand,
  2176.  
  2177. one  cannot  dedicate 8 buffers to each of four hosts, since that
  2178.  
  2179. would leave no buffers for any other function.  A similar problem
  2180.  
  2181. arises  with  respect  to  packets  which must be buffered at the
  2182.  
  2183. source node awaiting end-end acknowledgments (RFNMs).  There  can
  2184.  
  2185. be  as many as 8 such packets per "connection," where two packets
  2186.  
  2187. are considered to be on the same connection if they have the same
  2188.  
  2189. source  host,  the  same destination host, and the same priority.
  2190.  
  2191. With  four  source  hosts  per  node,  each  of  which   can   be
  2192.  
  2193. communicating  with an arbitrary number of destination hosts, the
  2194.  
  2195. number of buffers required to  guarantee  maximum  throughput  is
  2196.  
  2197. more buffers than exist in the entire node.  However, it is still
  2198.  
  2199.  
  2200.  
  2201.  
  2202.                               -36-
  2203.  
  2204.  
  2205. IEN-182                              Bolt Beranek and Newman Inc.
  2206.                                                     Eric C. Rosen
  2207.  
  2208.  
  2209.  
  2210. the case that there are  too  few  buffers  to  enable  a  buffer
  2211.  
  2212. management  scheme to ensure fairness to both host input and host
  2213.  
  2214. output functions. This  means,  of  course,  that  improving  the
  2215.  
  2216. buffer  management  scheme  can  increase  the  fairness, but not
  2217.  
  2218. optimize it.
  2219.  
  2220.  
  2221.         The way the ARPANET deals with this problem is simply  to
  2222.  
  2223. lump  together all host input and output functions and dedicate a
  2224.  
  2225. single pool of buffers to the combined  set  of  functions.  This
  2226.  
  2227. pool  is known as the "Reassembly" pool, and its size varies from
  2228.  
  2229. about 18 to 22 buffers,  depending  on  an  IMP's  configuration.
  2230.  
  2231. (The  term "reassembly" is very misleading in this context, since
  2232.  
  2233. reassembly of packets into messages is only one of many functions
  2234.  
  2235. which  must  obtain  buffers  from  the  reassembly  pool.)  This
  2236.  
  2237. approach recognizes that there is simply an  insufficient  amount
  2238.  
  2239. of  buffering to enable separate pools of buffers to be dedicated
  2240.  
  2241. to the separate hosts,  or  even  to  enable  separate  pools  of
  2242.  
  2243. buffers to be dedicated separately to input and output functions,
  2244.  
  2245. without paying the overly high price of ensuring poor performance
  2246.  
  2247. by   some   processes   even   under  conditions  of  low  buffer
  2248.  
  2249. utilization.  The main disadvantage of the approach  is  that  it
  2250.  
  2251. robs  the  buffer  management  scheme  of  its  ability to ensure
  2252.  
  2253. fairness among the various competing functions  that  are  lumped
  2254.  
  2255. together.   However,  that is really just the result of having an
  2256.  
  2257.  
  2258.  
  2259.  
  2260.                               -37-
  2261.  
  2262.  
  2263. IEN-182                              Bolt Beranek and Newman Inc.
  2264.                                                     Eric C. Rosen
  2265.  
  2266.  
  2267.  
  2268. insufficient supply of buffers, and we do  not  see  any  way  of
  2269.  
  2270. improving  the situation simply by altering the buffer management
  2271.  
  2272. scheme.  Attempting to maximize fairness under  these  conditions
  2273.  
  2274. requires a strategy other than partitioning the buffer space. The
  2275.  
  2276. scheme in the ARPANET, though, does make an attempt  to  separate
  2277.  
  2278. host-related  functions  from  functions  related  solely  to the
  2279.  
  2280. operation of the inter-IMP trunks.   Failure  to  separate  host-
  2281.  
  2282. related  functions  from  each  other  may  cause different host-
  2283.  
  2284. related functions to  interfere  with  each  other.   Failure  to
  2285.  
  2286. separate  host-related  functions from operation of the inter-IMP
  2287.  
  2288. trunks would enable host-related functions to interfere with  the
  2289.  
  2290. node's  store-and-forward  ability,  which  could  be even worse,
  2291.  
  2292. since that could make the network more prone to  congestion.   As
  2293.  
  2294. we  shall see, however, the ARPANET's buffer management scheme is
  2295.  
  2296. not  entirely  successful  in  preventing  interference   between
  2297.  
  2298. store-and-forward functions and host-related functions.
  2299.  
  2300.  
  2301.  
  2302.         Even though fairness between host input and  host  output
  2303.  
  2304. functions   cannot   be  guaranteed  in  the  ARPANET  simply  by
  2305.  
  2306. partitioning  the  buffer  space,  there  are  other   sorts   of
  2307.  
  2308. procedures  which a buffer management scheme can bring to bear to
  2309.  
  2310. help bring about (if not to  guarantee)  fairness.   The  present
  2311.  
  2312. buffer  management  scheme  makes no real attempt to "prioritize"
  2313.  
  2314. the input and output functions.  That is, if at some given  time,
  2315.  
  2316.  
  2317.  
  2318.                               -38-
  2319.  
  2320.  
  2321. IEN-182                              Bolt Beranek and Newman Inc.
  2322.                                                     Eric C. Rosen
  2323.  
  2324.  
  2325.  
  2326. buffers are needed for both input and output, the buffers will be
  2327.  
  2328. assigned in the order in which they are  requested.   Because  of
  2329.  
  2330. the  software  architecture  of  the IMP, this appears to give an
  2331.  
  2332. advantage to host input.  The request for  a  buffer  to  hold  a
  2333.  
  2334. packet  received  from  a local host is made by the high-priority
  2335.  
  2336. routine which services the host-IMP interface.  The request for a
  2337.  
  2338. buffer to hold a packet for output to a local host is made either
  2339.  
  2340. by the TASK process or by one of the background processes,  which
  2341.  
  2342. run  at  lower priority levels.  Furthermore, requests for output
  2343.  
  2344. buffers, if not served the first time they are made  (because  of
  2345.  
  2346. unavailability of buffers), are put on a queue which is served in
  2347.  
  2348. round-robin fashion at the lowest priority level.  Any number  of
  2349.  
  2350. requests  for host input buffers can be served between the time a
  2351.  
  2352. request for a host output buffer is first queued and the time  it
  2353.  
  2354. is  finally  served.   This  seems  to  violate  the principle of
  2355.  
  2356. congestion control which  states  that  output-related  functions
  2357.  
  2358. should  be  favored  over  input-related functions.  It would not
  2359.  
  2360. seem to be a difficult matter for requests for buffer space to be
  2361.  
  2362. prioritized  or re-ordered so that buffers are never provided for
  2363.  
  2364. input while there are outstanding requests  for  output  buffers.
  2365.  
  2366. (Note that this issue of re-ordering the requests would not arise
  2367.  
  2368. if there were  ample  buffer  space,  since  in  that  case,  all
  2369.  
  2370. functions could be guaranteed sufficient buffering, regardless of
  2371.  
  2372. the order in which requests were made.)
  2373.  
  2374.  
  2375.  
  2376.                               -39-
  2377.  
  2378.  
  2379. IEN-182                              Bolt Beranek and Newman Inc.
  2380.                                                     Eric C. Rosen
  2381.  
  2382.  
  2383.  
  2384.         This principle, however, would have to  be  applied  with
  2385.  
  2386. some care.  In the ARPANET, a request for output buffer space may
  2387.  
  2388. be either a request for one buffer (for single  packet  messages)
  2389.  
  2390. or a request for eight buffers (for multi-packet messages).  If a
  2391.  
  2392. source node has  requested  a  single-packet  allocate  for  some
  2393.  
  2394. packet  from  some  destination  node,  it must buffer the packet
  2395.  
  2396. until the output buffer  space  is  made  available.   Meanwhile,
  2397.  
  2398. other packets from the same source host may still be entering the
  2399.  
  2400. network.  On the other hand, if a source node is  waiting  for  a
  2401.  
  2402. multi-packet  allocate,  it  does  not  buffer  the  multi-packet
  2403.  
  2404. message while waiting.  Rather,  it  stops  all  input  from  the
  2405.  
  2406. source  host until the output buffers are allocated.  That is, if
  2407.  
  2408. a single-packet request remains unserved, buffer space is used as
  2409.  
  2410. the  source  node,  while  input  at  the  source  node continues
  2411.  
  2412. unabated.  If a multi-packet request remains unserved,  not  only
  2413.  
  2414. is  no buffer space wasted at the source node, but input from the
  2415.  
  2416. source host is stopped.  The congestion  control  principle  that
  2417.  
  2418. output  should  be  favored  over  input  is  reasonable  because
  2419.  
  2420. "output" means that resources already in use will be freed, while
  2421.  
  2422. "input" means that resources currently free will be put into use.
  2423.  
  2424. Competition between a host input packet and  an  unserved  single
  2425.  
  2426. packet  request  is clearly competition between input and output.
  2427.  
  2428. However, competition between host input and  an  unserved  multi-
  2429.  
  2430. packet  request is more like competition between input at one IMP
  2431.  
  2432.  
  2433.  
  2434.                               -40-
  2435.  
  2436.  
  2437. IEN-182                              Bolt Beranek and Newman Inc.
  2438.                                                     Eric C. Rosen
  2439.  
  2440.  
  2441.  
  2442. and input at another.  Hence, prioritization  or  re-ordering  of
  2443.  
  2444. requests  for buffers need only be done in the former case.  Even
  2445.  
  2446. there, care must be taken to ensure that a large flow  of  single
  2447.  
  2448. packet  messages  to  the hosts at one IMP does not prevent those
  2449.  
  2450. hosts from ever sending any inputs of their own into the network.
  2451.  
  2452. While  output  should be favored over input, output should not be
  2453.  
  2454. able to lock out input.  After all, output at one IMP is input at
  2455.  
  2456. another.  If output is too much favored over input, the result is
  2457.  
  2458. that input at one IMP is  favored  over  input  at  another  IMP.
  2459.  
  2460. Therefore,  it is possible that, IN THE ABSENCE OF A GENERAL FLOW
  2461.  
  2462. CONTROL PROCEDURE, which would explicitly match IMP-IMP flows  to
  2463.  
  2464. the  amount  of  resources  available,  PRIORITIZATION  OF BUFFER
  2465.  
  2466. REQUESTS COULD DO AS MUCH HARM AS GOOD.  A full investigation  of
  2467.  
  2468. the issues relevant to end-end flow control in the ARPANET is not
  2469.  
  2470. within the scope of the present contract, however.
  2471.  
  2472.  
  2473.         The 316/516 IMP does not  have  enough  buffer  space  to
  2474.  
  2475. ensure transmission over the inter-IMP trunks at the full rate of
  2476.  
  2477. 50 kbps.  Only the minimum number of buffers necessary to prevent
  2478.  
  2479. a  trunk  from being locked out is dedicated to each trunk.  This
  2480.  
  2481. minimum number, of course, is  one.   There  is  also  a  maximum
  2482.  
  2483. number  of  buffers  which  can  ever be under the control of the
  2484.  
  2485. combined trunk output processes.  This number is either  10,  12,
  2486.  
  2487. or  14,  depending  on  whether  the  IMP  has 2, 3, or 4 trunks.
  2488.  
  2489.  
  2490.  
  2491.  
  2492.                               -41-
  2493.  
  2494.  
  2495. IEN-182                              Bolt Beranek and Newman Inc.
  2496.                                                     Eric C. Rosen
  2497.  
  2498.  
  2499.  
  2500. Furthermore, there is also a minimum number of buffers which  are
  2501.  
  2502. available  for  trunk  output,  but  unavailable for host-related
  2503.  
  2504. functions.   This  number  (which  includes  the  single   buffer
  2505.  
  2506. dedicated  to each output trunk) is either 6, 9, or 12, depending
  2507.  
  2508. on whether the IMP has 2, 3, or 4  trunks.   (There  are  certain
  2509.  
  2510. exceptions  to  this  rule,  such  as  IMPs which have 16-channel
  2511.  
  2512. satellite lines.  See chapter  7  of  BBN  Report  No.  4088  for
  2513.  
  2514. details.   There  appears  to  be  no hard and fast rationale for
  2515.  
  2516. having chosen these particular numbers.  Rather, they just  "seem
  2517.  
  2518. to  work.")   These  buffers,  except  for  the buffers which are
  2519.  
  2520. dedicated to particular trunks, are not,  however,  dedicated  to
  2521.  
  2522. trunk output; they are also available for other functions that we
  2523.  
  2524. will discuss shortly.  The small difference between  the  minimum
  2525.  
  2526. and maximum numbers of buffers available for trunk output (either
  2527.  
  2528. 4, 3, or 2, depending  on  IMP  configuration)  form  a  pool  of
  2529.  
  2530. buffers  which  are generally sharable among all the processes in
  2531.  
  2532. the IMP, which can get them on a first-come, first-serve basis.
  2533.  
  2534.  
  2535.         There is also a maximum number of buffers which can  even
  2536.  
  2537. be  under  the  control  of  the  process which runs a PARTICULAR
  2538.  
  2539. output trunk.  This number is eight (except for satellite  lines,
  2540.  
  2541. for  which  the  number  is  sixteen).  The number eight does not
  2542.  
  2543. appear to have been chosen in order to meet  constraints  on  the
  2544.  
  2545. buffer management system.  Rather, eight is the number of logical
  2546.  
  2547.  
  2548.  
  2549.  
  2550.                               -42-
  2551.  
  2552.  
  2553. IEN-182                              Bolt Beranek and Newman Inc.
  2554.                                                     Eric C. Rosen
  2555.  
  2556.  
  2557.  
  2558. channels maintained by the IMP-IMP protocol.  That is, it is  the
  2559.  
  2560. number  of  packets  which  can be in flight simultaneously on an
  2561.  
  2562. inter-IMP trunk.  There is no inherent  reason  why  the  maximum
  2563.  
  2564. number  of  packets  under  control  of an output trunk (i.e. the
  2565.  
  2566. number in-flight at some instant PLUS the number queued  at  that
  2567.  
  2568. instant)  should  be  the  same  as the maximum number of packets
  2569.  
  2570. which can be  in  flight  simultaneously  on  that  trunk.   This
  2571.  
  2572. particular  choice  of number appears to have been made primarily
  2573.  
  2574. for ease of programming.
  2575.  
  2576.  
  2577.         The ARPANET IMP does contain a pool of buffers  dedicated
  2578.  
  2579. to the creation of end-end control messages.  In keeping with the
  2580.  
  2581. principle that, when buffers are in severely short supply, only a
  2582.  
  2583. minimum  number  should  be dedicated to any particular function,
  2584.  
  2585. the size of this pool is one.  Of course, an IMP  may  have  more
  2586.  
  2587. than  one  extant  end-end  control  message  at  a  time.   When
  2588.  
  2589. additional end-end control messages must  be  created,  they  are
  2590.  
  2591. treated  as host-related messages.  That is, to create an end-end
  2592.  
  2593. control  message,  a  buffer  from  the  pool  for   host-related
  2594.  
  2595. functions  must  be obtained.  This restriction is apparently due
  2596.  
  2597. to the fact that after  a  control  message  is  created,  it  is
  2598.  
  2599. treated  in some ways as if it were a packet submitted by a host.
  2600.  
  2601. That is, after a control message is created, it is  placed  on  a
  2602.  
  2603. queue  known  as  the  Reply Queue.  Packets are removed from the
  2604.  
  2605.  
  2606.  
  2607.  
  2608.                               -43-
  2609.  
  2610.  
  2611. IEN-182                              Bolt Beranek and Newman Inc.
  2612.                                                     Eric C. Rosen
  2613.  
  2614.  
  2615.  
  2616. Reply Queue by a "Back Host," and submitted to the IMP as if they
  2617.  
  2618. came  from  a real host.  A Back Host is a software routine which
  2619.  
  2620. runs at the background level of  the  IMP.   Its  purpose  is  to
  2621.  
  2622. submit  control  packets as if they were packets from a real host
  2623.  
  2624. (though of course, they are submitted at a point which  is  later
  2625.  
  2626. in  the IMP's logic than the point where a real host would submit
  2627.  
  2628. a packet).  This fact about the software architecture of the  IMP
  2629.  
  2630. makes  it appropriate to treat the creation of control packets in
  2631.  
  2632. a manner analogous to host input.  If the submission  of  control
  2633.  
  2634. packets  were handled differently from the submission of ordinary
  2635.  
  2636. host input, then it might not be appropriate to  create  protocol
  2637.  
  2638. messages on the same buffer pool as ordinary host messages, since
  2639.  
  2640. protocol messages are handled very  differently  and  in  general
  2641.  
  2642. have  different  constraints.   (Of  course,  one could raise the
  2643.  
  2644. further question as to  whether  the  "back  host"  mechanism  is
  2645.  
  2646. appropriate  for  handling control packets.  However, this cannot
  2647.  
  2648. be considered here.)
  2649.  
  2650.  
  2651.         We have spoken of the need for having a buffer  dedicated
  2652.  
  2653. to  input  from  each  inter-node  trunk,  in order to be able to
  2654.  
  2655. process  certain  sorts  of  control  messages  which,   although
  2656.  
  2657. occurring  relatively infrequently, need to be processed quickly,
  2658.  
  2659. with a high degree of responsiveness  (i.e.,  without  having  to
  2660.  
  2661. wait  on a queue).  The IMP does indeed dedicate a buffer to each
  2662.  
  2663.  
  2664.  
  2665.  
  2666.                               -44-
  2667.  
  2668.  
  2669. IEN-182                              Bolt Beranek and Newman Inc.
  2670.                                                     Eric C. Rosen
  2671.  
  2672.  
  2673.  
  2674. input trunk.  That is, a packet  which  has  just  arrived  on  a
  2675.  
  2676. certain  trunk  will not even be queued for the dispatcher (TASK)
  2677.  
  2678. if that would result in there being no buffer at all available to
  2679.  
  2680. receive  the next input from the trunk.  However, these dedicated
  2681.  
  2682. buffers are NOT used for processing those control  packets  which
  2683.  
  2684. require  high  responsiveness.   Not  only  are  such buffers not
  2685.  
  2686. queued for processing, but the packets in such buffers are  NEVER
  2687.  
  2688. processed  at all, they are simply discarded.  Even if the packet
  2689.  
  2690. is a line up/down protocol packet, which is ordinarily  processed
  2691.  
  2692. immediately by the routine that handles input from the trunks, it
  2693.  
  2694. will not be processed if processing it would mean that there is a
  2695.  
  2696. period  of  time  when no buffer is available to receive the next
  2697.  
  2698. input from that trunk.  Not even the acknowledgments which may be
  2699.  
  2700. piggybacked  in  the packet are processed.  Rather, the packet is
  2701.  
  2702. simply discarded, and its buffer reused for the next input.   The
  2703.  
  2704. apparent  purpose  of  this  procedure is to ensure that there is
  2705.  
  2706. never any period of time when a packet can be lost because  there
  2707.  
  2708. is no buffer available in which to receive it.  However, although
  2709.  
  2710. this procedure does help to avoid packet loss, it  does  this  by
  2711.  
  2712. deliberately discarding packets.  From a performance perspective,
  2713.  
  2714. there does not seem to be much difference between losing a packet
  2715.  
  2716. and  throwing  it  away.  In general, it is not sensible to throw
  2717.  
  2718. one packet away so that the next will not be  lost.   Either  the
  2719.  
  2720. buffer  dedicated  to an input trunk should be used to ensure the
  2721.  
  2722.  
  2723.  
  2724.                               -45-
  2725.  
  2726.  
  2727. IEN-182                              Bolt Beranek and Newman Inc.
  2728.                                                     Eric C. Rosen
  2729.  
  2730.  
  2731.  
  2732. processing of packets which need  high  responsiveness  (such  as
  2733.  
  2734. line  up/down  protocol  packets,  routing  updates, and received
  2735.  
  2736. IMP-IMP acknowledgments), or there should not  be  any  dedicated
  2737.  
  2738. input buffers.  Currently, the dedicated buffers are wasted.  The
  2739.  
  2740. worst thing a  buffer  management  scheme  can  do  is  to  waste
  2741.  
  2742. buffers, particularly when buffers are a scarce resource.
  2743.  
  2744.  
  2745.         The IMP does have a small pool of buffers which cannot be
  2746.  
  2747. placed  under  the  control of any host-related process or of any
  2748.  
  2749. process which regulates output on  the  inter-IMP  trunks.   (The
  2750.  
  2751. size  of  this pool is regulated by the parameter MINF, currently
  2752.  
  2753. set to 3.)  These buffers are available only for  the  processing
  2754.  
  2755. of  such  high  responsiveness  packets  as routing updates, line
  2756.  
  2757. up/down protocol packets, and received  IMP-IMP  acknowledgments,
  2758.  
  2759. and  for  the  creation  of  such subnetwork control packets (not
  2760.  
  2761. end-end control packets) as  nulls,  routing  updates,  and  line
  2762.  
  2763. up/down  protocol  packets.     These buffers are also useful for
  2764.  
  2765. mediating processor latency.  They are not, however, dedicated to
  2766.  
  2767. the  individual input trunks.  As we have pointed out previously,
  2768.  
  2769. it is quite desirable to have such a pool of buffers; this  seems
  2770.  
  2771. a good feature of the IMP's buffer management system.
  2772.  
  2773.  
  2774.         In BBN Report No. 4088 we pointed out several bugs in the
  2775.  
  2776. IMP's buffer management procedure.  One bug was the fact that the
  2777.  
  2778. buffers which are dedicated to input from  the  inter-IMP  trunks
  2779.  
  2780.  
  2781.  
  2782.                               -46-
  2783.  
  2784.  
  2785. IEN-182                              Bolt Beranek and Newman Inc.
  2786.                                                     Eric C. Rosen
  2787.  
  2788.  
  2789.  
  2790. are   completely  wasted.   This  bug  can  be  fixed  either  by
  2791.  
  2792. refraining  from  dedicating  buffers  to  trunk  input,  or   by
  2793.  
  2794. processing  the  packets  in  these buffers if (and only if) they
  2795.  
  2796. require high responsiveness.  This latter approach would in  some
  2797.  
  2798. sense be equivalent to increasing the value of MINF to three plus
  2799.  
  2800. the number of trunks, except  that  it  would  also  ensure  some
  2801.  
  2802. degree  of  fairness among the input trunks with respect to their
  2803.  
  2804. ability to obtain buffers from the MINF pool.  As we have already
  2805.  
  2806. discussed,  the  correct way to fix the bug may depend on whether
  2807.  
  2808. the IMP is short on buffers or short on CPU cycles.  Some mixture
  2809.  
  2810. of  the  two approaches may be needed, since in practice the IMPs
  2811.  
  2812. are sometimes short of buffer space and sometimes  short  of  CPU
  2813.  
  2814. cycles.   It must also be pointed out that processing of received
  2815.  
  2816. acknowledgments  from  a  particular  input  trunk  may  also  be
  2817.  
  2818. important  if  the  corresponding  output  trunk  has most of its
  2819.  
  2820. logical channels in  use,  even  if  there  are  plenty  of  free
  2821.  
  2822. buffers.   After  all, processing of received acknowledgments not
  2823.  
  2824. only frees buffers,  but  also  frees  logical  channels,  and  a
  2825.  
  2826. shortage  of  unused logical channels can have the same effect in
  2827.  
  2828. degrading performance as a shortage of buffers.  In order to pick
  2829.  
  2830. the   strategy  which  will  have  the  best  effect  on  network
  2831.  
  2832. performance, we will need to design a method  of  determining  in
  2833.  
  2834. real  time  which  resource  is  scarcest  in  the  IMP  at  some
  2835.  
  2836. particular moment.
  2837.  
  2838.  
  2839.  
  2840.                               -47-
  2841.  
  2842.  
  2843. IEN-182                              Bolt Beranek and Newman Inc.
  2844.                                                     Eric C. Rosen
  2845.  
  2846.  
  2847.  
  2848.         We also pointed out several other bugs in BBN Report  No.
  2849.  
  2850. 4088.   These bugs all have a common source, namely the fact that
  2851.  
  2852. when a buffer is moved from a source  process  to  a  destination
  2853.  
  2854. process,  the  buffer  management  scheme  takes no notice of the
  2855.  
  2856. source process.  In particular, a buffer may be rejected even  if
  2857.  
  2858. it cannot be freed.  This not only leads to the bugs we described
  2859.  
  2860. in our previous report, but also to the following  sort  of  bug.
  2861.  
  2862. Suppose  an IMP has three trunks, and that it has a maximum of 12
  2863.  
  2864. buffers which can be under  the  control  of  the  process  which
  2865.  
  2866. regulates output to the trunks.  Suppose that there are 8 buffers
  2867.  
  2868. queued for output to trunk 1, and 3 to trunk 2,  while  there  is
  2869.  
  2870. one  buffer  which  has  already been transmitted on trunk 3, but
  2871.  
  2872. which is presently awaiting acknowledgment.  Suppose also that  a
  2873.  
  2874. packet  received  from a local host is now ready for transmission
  2875.  
  2876. to its destination, and that it is routed out trunk 3.   The  IMP
  2877.  
  2878. will  not  permit this packet to be transmitted, since that would
  2879.  
  2880. place a 13th buffer under control of the trunk  output  routines.
  2881.  
  2882. Thus the buffer will be rejected, even through the trunk is idle,
  2883.  
  2884. and the other resources needed  to  transmit  the  packet  (e.g.,
  2885.  
  2886. logical   channels)   are  freely  available.   Furthermore,  the
  2887.  
  2888. rejected buffer will not be freed.  Refusing  the  buffer  simply
  2889.  
  2890. delays  transmission  of  the  packet  without  resulting  in the
  2891.  
  2892. freeing of any resource.  Thus  it  has  no  salutary  effect  on
  2893.  
  2894. network  performance, and is in fact counter-productive.  This is
  2895.  
  2896.  
  2897.  
  2898.                               -48-
  2899.  
  2900.  
  2901. IEN-182                              Bolt Beranek and Newman Inc.
  2902.                                                     Eric C. Rosen
  2903.  
  2904.  
  2905.  
  2906. an example of OVER-CONTROL in the  buffer  management  scheme;  a
  2907.  
  2908. buffer  is  prevented  from moving, even though considerations of
  2909.  
  2910. general network performance would dictate that it  be  passed  to
  2911.  
  2912. the  destination  process  immediately.    This  bug,  as well as
  2913.  
  2914. others we have discussed, would be eliminated  if  the  IMP  took
  2915.  
  2916. account of the buffer's source process as well as its destination
  2917.  
  2918. process.  Then the IMP could adopt a policy of never  refusing  a
  2919.  
  2920. buffer  FOR  CONSIDERATIONS  OF BUFFER MANAGEMENT unless doing so
  2921.  
  2922. would result in the buffer's being freed.
  2923.  
  2924.  
  2925.         Even if  the  ARPANET's  buffer  management  scheme  were
  2926.  
  2927. modified  to  take account of the criticisms we have been making,
  2928.  
  2929. there would still be a major problem with  it.   The  problem  is
  2930.  
  2931. that  in  the  competition  for  buffers  to  be used to transmit
  2932.  
  2933. packets to a neighboring IMP, packets input from local hosts  are
  2934.  
  2935. favored  over  packets  arriving  from  neighboring IMPs, thereby
  2936.  
  2937. violating an important principle of congestion control.  Not only
  2938.  
  2939. can  host access lines be of higher speeds than inter-IMP trunks,
  2940.  
  2941. but the 1822 protocol, which governs host-IMP  access,  does  not
  2942.  
  2943. allow  the  IMP  to  drop  a packet it has received.  The IMP-IMP
  2944.  
  2945. protocol, on the other hand, does allow a receiving IMP to drop a
  2946.  
  2947. packet.   We  have  already pointed out the way in which this can
  2948.  
  2949. cause a buffer management scheme to favor the  packets  from  the
  2950.  
  2951. local  hosts.   Since  it  is  not  feasible  to  modify the 1822
  2952.  
  2953.  
  2954.  
  2955.  
  2956.                               -49-
  2957.  
  2958.  
  2959. IEN-182                              Bolt Beranek and Newman Inc.
  2960.                                                     Eric C. Rosen
  2961.  
  2962.  
  2963.  
  2964. protocol, some other means of eliminating or  at  least  reducing
  2965.  
  2966. this favoritism must be developed.
  2967.  
  2968.  
  2969.         One way of reducing this favoritism would be to define  a
  2970.  
  2971. pool  of buffers reserved exclusively for "transit packets", i.e.
  2972.  
  2973. packets whose origin and destination are both  remote.   No  such
  2974.  
  2975. buffer  pool  exists  in  the  ARPANET  at  present.  The current
  2976.  
  2977. store-and-forward pool can  be  completely  filled  with  locally
  2978.  
  2979. originating  packets.   Although  a  locally  originating  packet
  2980.  
  2981. requires a buffer from reassembly space when it first enters  the
  2982.  
  2983. IMP,  it  is  moved into store-and-forward space as soon as it is
  2984.  
  2985. queued to an output trunk.   Since  locally  originating  packets
  2986.  
  2987. cannot  be  discarded,  and  hence should never be refused by the
  2988.  
  2989. buffer management scheme after they are originally received, this
  2990.  
  2991. division  of  the  buffer pool does not prevent host packets from
  2992.  
  2993. locking out transit packets entirely.  It does  prevent  all  the
  2994.  
  2995. buffers  in the IMP from being devoted to host-related functions,
  2996.  
  2997. which is very important if the IMP is to continue to function  as
  2998.  
  2999. a  store-and-forward  node  even while handling a large amount of
  3000.  
  3001. host traffic.  Note, however, that a pool  dedicated  to  transit
  3002.  
  3003. packets  would  have the same effect.  Furthermore, it would have
  3004.  
  3005. the additional salutary effect of ensuring a  supply  of  buffers
  3006.  
  3007. for transit packets.
  3008.  
  3009.  
  3010.         We recommend therefore the elimination of the  store-and-
  3011.  
  3012.  
  3013.  
  3014.                               -50-
  3015.  
  3016.  
  3017. IEN-182                              Bolt Beranek and Newman Inc.
  3018.                                                     Eric C. Rosen
  3019.  
  3020.  
  3021.  
  3022. forward  pool,  and  the creation of a transit pool.  The transit
  3023.  
  3024. pool would consist of a minimum number of buffers which would  be
  3025.  
  3026. dedicated to packets with remote origins and remote destinations.
  3027.  
  3028. Locally originating packets would never be placed in the  transit
  3029.  
  3030. pool,  but  would remain in the Reassembly pool (which we suggest
  3031.  
  3032. renaming the "end-end" pool), even while queued for  transmission
  3033.  
  3034. out an inter-IMP trunk.
  3035.  
  3036.  
  3037.         It is also desirable to ensure that a certain  number  of
  3038.  
  3039. transit  packets  may  always be queued simultaneously to a given
  3040.  
  3041. output trunk.  Although the presence of the transit pool prevents
  3042.  
  3043. transit  packets  from  being  locked  out  entirely, it does not
  3044.  
  3045. prevent them from being locked  out  on  some  particular  output
  3046.  
  3047. trunk.   However,  since  every packet queued for an output trunk
  3048.  
  3049. must be assigned to a logical channel, this can be  prevented  by
  3050.  
  3051. saving  a  certain  number  of logical channels on each trunk for
  3052.  
  3053. transit  packets  only.   This  may  require   that   a   locally
  3054.  
  3055. originating   packet  with  a  remote  destination  sometimes  be
  3056.  
  3057. refused, even though the trunk is idle  and  the  refused  buffer
  3058.  
  3059. cannot  be  freed.  However, the reason for refusing in this case
  3060.  
  3061. is not buffer management, but  management  of  logical  channels.
  3062.  
  3063. Refusing  a  host  packet  (destined to a remote destination) for
  3064.  
  3065. reasons of logical channel management WILL result in keeping free
  3066.  
  3067. a  logical  channel  that  would  otherwise be occupied.  So even
  3068.  
  3069.  
  3070.  
  3071.  
  3072.                               -51-
  3073.  
  3074.  
  3075. IEN-182                              Bolt Beranek and Newman Inc.
  3076.                                                     Eric C. Rosen
  3077.  
  3078.  
  3079.  
  3080. though no buffer is  freed,  the  packet  can  still  be  refused
  3081.  
  3082. without violating any principles of resource management.
  3083.  
  3084.  
  3085.  
  3086.  
  3087.  
  3088.  
  3089.  
  3090.  
  3091.  
  3092.  
  3093.  
  3094.  
  3095.  
  3096.  
  3097.  
  3098.  
  3099.  
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107.  
  3108.  
  3109.  
  3110.  
  3111.  
  3112.  
  3113.  
  3114.  
  3115.  
  3116.  
  3117.  
  3118.  
  3119.  
  3120.  
  3121.  
  3122.  
  3123.  
  3124.  
  3125.  
  3126.  
  3127.  
  3128.  
  3129.  
  3130.                               -52-
  3131.  
  3132.  
  3133.